setf
(setf place value [place2 value2 ...])
Generalized assignment: stores value into the location named by place and returns the value. Beyond plain variables, the supported places are the list accessors car, cdr, nth, first through fourth, rest, and the caXXXr compositions, plus elt (a runtime list/string/vector dispatch: a list cell and a vector -- including a mutable buffer from make-string -- are written in place, while a string literal is rebuilt and rebound like (setf (char ...)), so its place must be a variable and an alias made before the write still sees the old content), so you can mutate a specific slot of an existing structure in place. It expands into the appropriate primitive mutator (such as rplaca/rplacd). Place subforms are evaluated before the value, so the tail-collection idiom (setf (cdr tail) (setf tail (list x))) links the old tail.
Multiple place/value pairs assign sequentially (each pair sees the effects of the previous ones), and the last value is returned:
(setf (getf place indicator) value) writes a property list: when the indicator already has a cell its VALUE cell is written in place (so an alias of the same list sees the update), otherwise the pair is consed onto the front and the result stored back through place. A third subform in the place is getf's default and is ignored by the write.
Beyond the built-in places, a defstruct accessor, a CLOS :accessor, and a user-defined setf-function ((defun (setf name) ...), or the generic (defmethod (setf name) ...) — see defmethod) are also places: (setf (name arg...) value) calls the writer with the new value first. See defun for setf-function definitions. (setf (symbol-function 'name) fn) / (setf (fdefinition 'name) fn) install a global function definition (see symbol-function).