You are calling a macro and passing it a symbol that refers to a var holding s vector of strings. The macro is given the raw symbol unevaluated and unresolved by the compiler. Remember macros receive their arguments unevaluated. Resolving symbols and dereferencing vars is part of *evaluation*.
If you want to look at what the symbol refers to at compile time you'd have to do something like (defmacro gen-fns [names] `(do ~@(map gen-fn @(resolve names)))) This is manually resolving the symbol and dereferencing the var. this also assumes that the var is bound to what you want at this point - which is true for typical vars if it is defined above this macro usage. However I'm not sure this macro would be a good idea written like this since 'names' sounds like a collection is expected and not a symbol referring to a collection. Also I think the semantics of wanting a symbol to resolve seems a bit awkward and not really a clean design choice. I'd probably stick to using the macro 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.
