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

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.