Hi, Am 18.07.2009 um 05:52 schrieb Rowdy Rednose:
How can I lexically bind names like "let" does in a macro, when names and values for those bindings are passed in?
You can't. A macro cannot depend on runtime information (for some suitable definition of "runtime information", I know). In a call like `(a-macro foo)` the macro does not see the Var "foo", but only the Symbol "foo". (Note the error message!) Using eval is not really a solution. (def foo '[a 1 b 2]) (let-coll foo ...) will probably work with eval, but (let [foo '[a 1 b 2]] (let-coll foo ...)) will not. Hope this helps. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature