I tried to post this once but I think it failed... The issue is your macro receives its arguments unevaluated by the compiler. In your example you are passing the symbol 'names' to the macro. At compile-time/macroexpansion-time you are expecting that 'names' will be resolved and dereferenced to a vector of strings, but it isn't.
If you wanted your macro to work for this example you'd have to do something like: (defmacro gen-fns [names] `(do ~@(map gen-fn @(resolve names)))) However, I think this is probably not the cleanest design of this macro. For one, 'names' sounds like it is intended to be a collection - not a symbol. I don't know your use case, but the best way is say to have this do what you want is to call it with the vector directly like: (macro/gen-fns ["a" "b" "c"]) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
