THE EVALUATOR
The process of evaluation in XLISP:
Strings, characters, numbers of any type, objects, arrays, structures, streams, subrs, fsubrs and closures evaluate to themselves.
Symbols act as variables and are evaluated by retrieving the value associated with their current binding.
Lists are evaluated by examining the first element of the list and then taking one of the following actions:
- If it is a symbol, the functional binding of the symbol is retrieved.
- If it is a lambda expression, a closure is constructed for the function described by the lambda expression.
- If it is a subr, fsubr or closure, it stands for itself.
- Any other value is an error.
Then, the value produced by the previous step is examined:
XLISP-PLUS - Version 2.1g - Tom Almy
tom.almy@tek.com - 18 JUL 94
Generated with WebMaker