|
Allegro CL |
ANSI Common Lisp 5 Data and Control Flow 5.1 Generalized Reference 5.1.1 Overview of Places and Generalized Reference
5.1.1.2 Setf ExpansionsSometimes it is possible to avoid evaluating subforms of a place multiple times or in the wrong order. A setf expansion for a given access form can be expressed as an ordered collection of five objects:
The value returned by the accessing form is affected by execution of the storing form, but either of these forms might be evaluated any number of times. It is possible to do more than one setf in parallel via psetf, shiftf, and rotatef. Because of this, the setf expander must produce new temporary and store variable names every time. For examples of how to do this, see gensym. For each standardized accessor function F, unless it is explicitly documented otherwise, it is implementation-dependent whether the ability to use an F form as a setf place is implemented by a setf expander or a setf function. Also, it follows from this that it is implementation-dependent whether the name (setf F) is fbound. |