© 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.