Subject: Re: Mapping by N elements From: Erik Naggum <erik@naggum.no> Date: 1999/04/07 Newsgroups: comp.lang.lisp Message-ID: <3132455299515355@naggum.no> * 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 <plist> by #'cddr collect (<whatever> key value)) I don't see a need for a generalization of his idiom. #:Erik