I'm not sure where I picked it up, but I remembered the arguments being
called &form and &env, and googling for "clojure &form &env" led me to:
http://groups.google.com/group/clojure/browse_thread/thread/d710c290b67951a3/b827d46389110f26?lnk=gst&q=clojure+macro+%26env#b827d46389110f26
:
"&form con
@Jürgen and Chris
Thank you very much for helping me enlarge my understanding of macros!
I realize that learning the subtleties of a macro implementation is
not easy but well worth the effort.
It is also quite interesting that a macro as it seems takes two
implicit extra arguments. I am curious
On Oct 1, 3:59 am, Stefan Rohlfing wrote:
> I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
> 'Clojure in Action' to handle nested s-expressions:
>
> My first version did not work:
>
> (defmacro my-infix [expr]
> (if (coll? expr)
> (let [ [left op right] expr]
> (lis
2010/10/1 Stefan Rohlfing :
> Dear Clojure Group,
>
> I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
> 'Clojure in Action' to handle nested s-expressions:
>
> My first version did not work:
>
> (defmacro my-infix [expr]
> (if (coll? expr)
> (let [ [left op right] expr]
>
Dear Clojure Group,
I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
'Clojure in Action' to handle nested s-expressions:
My first version did not work:
(defmacro my-infix [expr]
(if (coll? expr)
(let [ [left op right] expr]
(list op (my-infix left) (my-infix right))