[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unwind-protect description



You could word it by giving an implementation of unwind-protect as a macro
in terms of other primitives. The first step is of course
(unwind-protect body1 body2) => (*unwind-protect #'(lambda () body1)
						 #'(lambda () body2))
Which makes the environment issue clear. Then, given a form of catch
and throw called %CATCH and %THROW that do not take a TAG first argument
you can implement common-lisp CATCH and THROW while taking care of unwind
protect quite neatly.