Subject: Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 01 Jul 2005 20:22:31 -0500
Newsgroups: comp.lang.lisp
Message-ID: <Ao2dnSrQPYTKcVjfRVn-qg@speakeasy.net>
Juliusz Chroboczek  <jch@pps.jussieu.fr> wrote:
+---------------
|   (defmacro \\ (args &body body)
|     (let ((args (if (listp args) args (list args))))
|       `#'(lambda ,args ,@body)))
+---------------

I tend to prefer the Scheme-style default for the non-list arg case:

    > (defmacro \\ (args &body body)
        `(lambda ,(if (listp args) args (list '&rest args)) ,@body))

    |\\|
    > (mapcar (\\ x (+ (third x) (* 2 (second x))))
	      '(1 2 3) '(4 5 6) '(7 8 9))

    (15 18 21)
    > 

But that's just me...  ;-}


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607