From ... From: Erik Naggum Subject: Re: Mapping by N elements Date: 1999/04/07 Message-ID: <3132455299515355@naggum.no>#1/1 X-Deja-AN: 463537495 References: mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * samir@mindspring.com (Samir Barjoud) | Is there any function or macro defined by Common Lisp that does the | following? : | Here is its fictional documentation: | | (map-by VARLIST LIST &rest BODY) | | A macro returning a list created by binding successive N elements of LIST | to the symbols in VARLIST (where N is the length of VARLIST) and | executing BODY each time around. The return value of BODY is used as each | element of the return list. the much undeservedly maligned extended LOOP macro does this for me whenever I need the above, which is only when processing property lists: (loop for (key value) on by #'cddr collect ( key value)) I don't see a need for a generalization of his idiom. #:Erik