Hi, Am 10.03.2009 um 19:45 schrieb Howard Lewis Ship:
(defmacro example
[& code]
`(let [rcode# ~(reverse code)
fn# (to-fn rcode#)]
(run-example fn#)))
Your problem is, to-fn is a macro. So when you expand
the macro, the expansion calls to-fn with the symbol
generated by rcode#. Then in to-fn you try to use it as
a list => *BOOM*.
You have to reverse the code in the macro an itself and
then make sure, that the to-fn in the expansion sees the
code.
(defmacro example
[& code]
(let [rcode (reverse code)]
`(let [fn# (to-fn ~rcode)]
(run-example fn#))))
Hope this helps.
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
