Peter Seibel <email@example.com> wrote:
| tfb@conquest.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
| > But yuck, what's with all the gensyms?!?! The whole point of lifting
| > the body of the code is to insulate it from the LOOP's lexical
| > environment:
| > (defmacro dolist-by-cddr ((var list &optional retform) &body body)
| > `(let ((body (lambda (,var) ,@body))
| > (retval (lambda (,var) ,@retform))
| > (list ,list))
| > (loop for elt in list by #'cddr
| > do (body elt)
| > finally (return (retval nil)))))
| Uh, don't you need some FUNCALLs? This isn't c.l.s you know.
Or put the first two in an FLET instead of LET.
Then (BODY foo) & (RETVAL foo) would work.
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607