Next: , Previous: , Up: Rep's Lisp Introduction   [Contents][Index]

5.1.4 Notation

Wherever an example of evaluating a Lisp form is shown it will be formatted like this,

(+ 1 2)
    ⇒ 3

The glyph ‘’ is used to show the computed value of a form. 1

When two forms are shown as being exactly equivalent to one another the glyph ‘’ is used, for example,

(car some-variable) ≡ (nth 0 some-variable)

Evaluating some forms result in an error being signalled, this is denoted by the ‘error→’ glyph.

(open-file "/tmp/foo" 'read)
    error→ File error: No such file or directory, /tmp/foo



In this case the list ‘(+ 1 2)’ (i.e. the list containing three elements, the symbol + and, the numbers 1 and 2), represents a function application. The first element in the list is the name of the function to be called, all other elements are the arguments to apply to it. Since the + function adds a series of numbers, the above function call is actually performing the computation ‘1 + 2’.