setf
Setf is a macro in Common Lisp that generalizes assignment to a destination, or place. It is not a function; its purpose is to store a value in a place that can be a simple variable or a more complex location such as an array element, a slot in a structure, or a user-defined location expanded by a setf mechanic. The setf macro takes a place designator and a value expression, evaluating the value and storing it in the specified place.
A place, in this context, is any location capable of holding a value. Simple examples include a
In Common Lisp, (setf place new-value) evaluates new-value and stores it in place, returning the stored value.
Related concepts include setq for variable assignment and the general notion of places in the language. Setf