O'Reilly logo

Interpreting LISP: Programming and Data Structures, Second Edition by Gary D. Knott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required