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_21

21. More Functions

Gary D. Knott

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

This chapter discusses more functions and special forms.

  • SUM: function with a varying number of arguments

    v[(SUM n 1 n 2 n k )] = v[(PLUS n 1 (PLUS n 2 ((PLUS n k 0))))].

  • PRODUCT: function with a varying number of arguments

    v[(PRODUCT n 1 n 2n k )] = v[(TIMES n 1 (TIMES n 2 (…(TIMES n k 1)) … ))].

  • DO: function with a varying number of arguments

    v[(DO x 1 x 2 x k )] = v[x k ].

    Since DO is a function, its arguments are all evaluated from left to right, and the last argument value is then returned. This function is useful when its arguments ...

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