[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Iterated SETF
- To: RICH at MIT-AI
- Subject: Iterated SETF
- From: MOON at MIT-MC (David A. Moon)
- Date: Fri ,18 Jul 80 22:37:00 EDT
CC: (BUG LISPM) at MIT-MC, (BUG LISP) at MIT-MC
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)
...)