© Gary D. Knott 2017

Gary D. Knott, Interpreting LISP, 10.1007/978-1-4842-2707-7_11

11. More Special Forms

Gary D. Knott

(1)Civilized Software Inc., Silver Spring, Maryland, USA

  • AND: special form with a varying number of arguments

    v[(AND x 1 x 2x k )] = if v[x 1] ≠ NIL and v[x 2] ≠ NIL and … v[x k ] ≠ NIL then T else NIL.

    The special form AND is evaluated using lazy evaluation; this means that the arguments are evaluated and tested against NIL from left to right and the first NIL-valued argument is the last argument evaluated.

  • OR: special form with a varying number of arguments

    v[(OR x 1 x 2x k )] = if v[x 1] ≠ NIL or v[x 2] ≠ NIL or … or v[x k ] ≠ NIL then T else NIL.

    The special form OR is evaluated using lazy evaluation; the ...

Get Interpreting LISP: Programming and Data Structures, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.