Re: splicing and anonymous functions

2011-01-30 Thread Phillip Calçado
Thanks, Ben, I think that while simplifying the example to create a small failing test case I made some confusion about the root cause of the problems I was having. Cheers -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: splicing and anonymous functions

2011-01-30 Thread B Smith-Mannschott
(1) #( ... ) is tanslated to (fn* [ ARGS ] ( ... )) before any macros are expanded because it is a *reader macro*. (2) The contents of #() are taken to be a function application. That's why you can write #(+ 1 %) and have + applied to 1 and %. By the same token, you can't write #(true) and expect

splicing and anonymous functions

2011-01-30 Thread Phillip Calçado
Hi all, I've stumbled upon some interesting behaviour regarding macros and anonymous functions. I couldn't find doco anywhere on this so if you have any pointers please let me know. Considering the macro: (defmacro splicer [a] `(list ~@ a)) What's the expected result of: (macroexpand-1 '(splic