Re: Lisp syntax vs. Mathematica syntax
- From: Wade Humeniuk <whumeniu+anti+spam@xxxxxxxxx>
- Date: Sat, 20 Aug 2005 15:10:00 GMT
Jon Harrop wrote:
Here's my puny attempt at a Lisp conversion that only works for single-argument functions:
(defmacro mapply (`f `(g arg)) `(,f ,arg))
Your macro is wrong, here is a corrected version and a multi-arg version
(defmacro mapply (f (g arg)) (declare (ignore g)) `(,f ,arg))
(defmacro mapply (f (g &rest args)) (declare (ignore g)) `(,f ,@args))
CL-USER 2 > (mapply + (g 3 10)) 13
CL-USER 3 >
Wade .
- Follow-Ups:
- Re: Lisp syntax vs. Mathematica syntax
- From: Jon Harrop
- Re: Lisp syntax vs. Mathematica syntax
- From: Jon Harrop
- Re: Lisp syntax vs. Mathematica syntax
- References:
- Re: Very poor Lisp performance
- From: Förster vom Silberwald
- Re: Very poor Lisp performance
- From: Michael Sullivan
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Hartmann Schaffer
- Re: Very poor Lisp performance
- From: Jamie Border
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Christophe Rhodes
- Re: Very poor Lisp performance
- From: Joe Marshall
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Tayssir John Gabbour
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Joe Marshall
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Ulrich Hobelmann
- Re: Very poor Lisp performance
- From: Jon Harrop
- Lisp syntax vs. Mathematica syntax
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Lisp syntax vs. Mathematica syntax
- From: Jon Harrop
- Re: Lisp syntax vs. Mathematica syntax
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Lisp syntax vs. Mathematica syntax
- From: Jon Harrop
- Re: Very poor Lisp performance
- Prev by Date: Re: Lisp syntax vs. Mathematica syntax
- Next by Date: Re: Very poor Lisp performance / about Mathematica
- Previous by thread: Re: Lisp syntax vs. Mathematica syntax
- Next by thread: Re: Lisp syntax vs. Mathematica syntax
- Index(es):