[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Iterated SETF



Since the field definitions can be completely arbitrary, there
can be no possible elegant way of doing this with run-time variable
structure field references.  If you only want
a constant set of field definitions you can use a macro such
as the one GLS suggested, although for clarity you probably don't
want to use a MAPCAR-like syntax; maybe something more like SETQ,
e.g.	(MULTI-SETF <expression-evaluating-to-structure>
		field-name value-expression
		field-name value-expression
		...)
	    =>
	(LET ((.TEMP. <expression-evaluating-to-structure>))
	  (SETF (field-name .TEMP.) value-expression)
	  ...)