3 ms·
That looks like Common Lisp, which also has a general version named unwind-protect: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/speope_unw
by prodigal_erik 15y ago
That looks like Common Lisp, which also has a general version named unwind-protect: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/speope_unwind-protect.html http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec...
- SeanLuke 15y agoNot really. unwind-protect is just Lisp's version of Java's "finally" statement.
- prodigal_erik 15y agoOh you're right, it'd need to take a param with the setup form(s) and somehow look up the corresponding cleanup form(s), sort of like getter and setter code registered with setf.