BEE Lisp Functions Reference

<object> SETF (ID VAL)

Sets value of object VAL to the value of object ID. If ID is identifier, then function will search for the object with that name, going up through the stack to higher addresses memory block, where global variables defined. If such an object is found, its value will be changed to VAL. If such an object doesn’t exist, then it will be created in local memory of current function. If ID is list, then it will be evaluated, and assignment will be made to that evaluation result.

Example:

(SETF myvar  ‘(3 4 5))               ; assign list to ‘myvar’ atom

(SETF (CAR myvar) 5)              ; replace the first element of ‘myvar’ list to 5.