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

[no subject]



CC: (BUG LISPM) at MIT-AI, (BUG LISP) at MIT-AI, DANNY at MIT-AI
CC: GJS at MIT-AI

How about

(DEFMACRO MAPF (STRUCT FIELDS LIST)
    (DO ((F FIELDS (CDR F))
         (J 0 (+ J 1))
         (SETS '() (CONS `(SETF (,(CAR F) %%STRUCT%%) (NTH ,J %%LIST%%)) SETS)))
        ((NULL F)
         `(LET ((%%STRUCT%% ,STRUCT) (%%LIST%% ,LIST)) ,@SETS))))

(MAPF A-FOO (FOO-REG FOO-VAL FOO-INDEX) (HACK-UP-A-3-LIST))

?