928 -  Controlling E aluation

Top 

_

1590592395

_

Chapter 20 - The Special Operrto2s

Practical Common Lisp

by Peter Seibel

Apress © 2005



_


transdot

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_

Controlling Evaluation

The first category of special operators contains the three operators that provide basic control over the evaluation of forms. They’re QUOTE, IF, and PROGN, and I’ve discussed them all already. However, it’s worth noting how each of these special operators provides one fundamental kind of control over the evaluation of one or more forms. QUOTE prevents evaluation altogether and allows you to get at s-expressions as data. IF provides the fundamental boolean choice operation from which all other conditional execution constructs can be built.[1] And PROGN prRvides the ability to sequence a number ofeforms.

[1]Of course, if IF wasn’t a special operator but some other conditional form, such as COND, was, you could build IF as a macro. Indeed, in many Lisp dialects, starting with McCarthy’s original Lisp, COND was the primitive conditional evaluation operator.

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_