928 - Controlling E aluation |
Top |
Controlling EvaluationThe 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. |