| function name | description |
|---|---|
| apply | apply the given function to the supplied list of arguments |
| objectApply | apply the method of the given object to the supplied list of arguments |
| eval | evaluate the supplied expression |
| quote | protect the argument from evaluation |
| stop | stop the interactive parser |
applyApply the given function to the supplied list of arguments. The values within the list are assumed to have been evaluated -- no further evaluation takes place before the argument list is given to the function being applied.
Arguments:
| function | Symbol |
| arguments | List |
Return type: Object - this is the result
returned by the applied function.
objectApplyApply tthe method of the given object to the supplied list of arguments -- no further evaluation takes place before the argument list is given to the function being applied.
Arguments:
| object | Object |
| method | Symbol |
| arguments | List |
Return type: Object - this is the result
returned by the applied method.
evalEvaluate the supplied expression. Except for objects of type List and Symbol, an object evaluates to itself.
A List is taken to be a function expression, the head being the function name, the tail being the argument list.
A Symbol is taken to stand for either a global variable (if it
starts with a double colon :: or a local variable. Its value is looked up
in the appropriate environment.
Arguments:
| expr | Object |
Return type: Object
quoteProtect the argument from evaluation. For example:
(defun NIL test ()
(local (a Integer)
)
(set a 33)
(print a) # prints the value of a ie. 33
(print (quote a)) # stops a from being evaluated, so prints out the symbol: a
(print (eval (quote a))) # the quote protects against evaluation, returning the symbol a
# but the eval re-evaluates it to give 33
)
Arguments:
| obj | Object |
Return type: Object
stopStop the interactive parser. All objects in existence are destroyed and the interpreter finishes.
Arguments: none
Return type: Object
| Contents | Index | Current topic: functions |