The less-familiar parts of Lisp for beginners — find-restart

We now move on to find-restart.  This is not quite the same as the various find- methods we’ve been very briefly discussing recently.  There is a bit more to say about this function.

The find-restart function provides some information about the current lexical environment.  That is, it allows a form to get insight into the nature of the forms that enclose it.  Now, before talking about this, you might find it helpful to review the earlier series of posts on exception handling in Lisp.

Broadly, you can say that find-restart returns to the caller the restart object that would be invoked to handle a particular condition, or nil if there is no such restart.  In C++ terms, this is a way, at run time, for a function to ask whether there is an enclosing catch-er for a particular thrown exception.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

反垃圾邮件 / Anti-spam question * Time limit is exhausted. Please reload CAPTCHA.