Next: , Previous: , Up: Getting Started   [Index]


1.3 Evaluation

LISTS

The symbolic expressions given above are also called lists. A list is just a sequence of objects inside a pair of parentheses. LISP assumes that the first element of the list is an operator. It assumes that the rest of the list contains arguments to this operator. LISP applies the operator to the arguments. This process of taking a symbolic expression, or list, and performing a computation based on it is called evaluation. The resulf of evaluating an s-expression is called the value of that expression. In the list ‘(+ 8 3)’, LISP assumed that the ‘+’ is an operator to be applied to the arguments ‘8’ and ‘3’. The result of this evaluation was the value ‘11’. When it had finished evaluating this s-expression, LISP printed out the resulting value on the terminal.