setf
setf(g_placeg_value) =>g_resultsetf( g_place:=g_value => g_result
Description
Assigns a new value to an existing storage location, destroying the value that was previously in that location. setf is the same as the assignment (:=) operator. This is a syntax form.
The setf function uses special expander functions, defined as setf_<helper>.
Arguments
Value Returned
Examples
x = '(a b c d e)
setf( (car x) 42);; here x changes to (42 b c d e)
=> (42 b c d e)
x = '(a b c d e)
(car x) := 42
x
=> (42 b c d e)
Related Topics
Return to top