6  Conclusion

We see that the Friedman-Haynes cob technique for deriving constrained forms of call/cc is a reliable way to implement various forms of unwind-protect -- both the Pitman-style ones that rely on explicit user annotation, and the Friedman-Haynes ones that depend on the relative positions of unwind-protects and continuations on the control tree.

The cob technique is not the only way to derive unwind-protect -- for an ingenious way to derive call/cc-e using Scheme's built-in dynamic-wind, see Clinger [2]. However, the cob approach remains a predictable workhorse for systematically experimenting with new styles and modifying existing styles. This kind of flexibility is especially valuable for unwind-protect since the latter cannot have a canonical, once-and-for-all specification in Scheme, making it important to allow for multiple library solutions.