[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: BUG-LISPM at MIT-AI, BUG-LISP at MIT-AI
- From: Charles Rich <RICH at MIT-AI>
- Date: Fri, 18 Jul 80 19:58:00 GMT
- Cc: DANNY at MIT-AI, GJS at MIT-AI
- Original-date: 18 July 1980 15:58-EDT
I am having trouble figuring out an elegant way to write a function
which maps down a list of access functions, (e.g. the fields of
a DEFSTRUCT), performing a SETF for each one. For example,
I would like something of the following flavor to work (which
obviously doesn't because F is not evaluated at the right time
in the SETF).
(MAPC #'(LAMBDA (F) (SETF (F STRUC) NIL))
'(FIELD1 FIELD2 FIELD3 ...))
This seems like a reasonable repetitive action which it should be
easy to specify succintly in the general framework of SETF,
LOCF, etc.
I appeal to the wizards to show me how to do this nicely; or
perhaps this suggests some new macro or extension to SETF.
Thanks, Chuck.