The less-familiar parts of Lisp for beginners — pprint-pop

Next, we come to pprint-pop.  Like most of the pretty-printing functions we’ve described recently, this is intended to be used inside a block defined by pprint-logical-block.  In fact, this local macro cannot be used outside of one of those blocks, and may not even be bound.

The pprint-pop local macro is used to remove the next object from the list being printed, and return it to the caller.  It is important to use pprint-pop rather than a bare pop, because of the behaviour which we previously mentioned, that a pprint-logical-block may be executed in its entirety more than once, in order to do circularity detection.  Calling the pop macro would lead to unpredictable behaviour, as the list that the pprint-logical-block is processing would be modified between the two passes.

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.