Reader: Source code (text) -> Clojure reader -> Data structures (code) Compiler: [function or special form] -> bytecode, [macro] -> Data structures (code) Runtime: Data structures are evaluated: Literals -> to themselves (1->1, "some string" -> "some string", :some-key -> :some-key) Symbols -> to a value (from a var in some namespace) Lists -> call to a function or special form.
A call to a macro take place at compile time before the data structures (code) are evaluated. It is a transformation tool of data structures (code) to data stuctures (code) before the evaluation take place. You are using the wrong tool for the job, if you want to iterate over the contents of a variable (runtime), use a function. On Friday, February 15, 2013 2:44:53 PM UTC+2, Jason Lewis wrote: > > Hey, Clojure n00b here... I'm working with a macro that expects a vector > and iterates over the contents with a `for` form. I had naively assumed > that it would work equally well to pass it a var containing the vector, but > instead it tries to iterate over the individual symbol and the output is > munged. > > I also tried passing the fn call that I was using to build the vector, > with no better results. Is there any way to force evaluation so the macro > 'sees' the vector it expects instead of trying to work on the symbol or > form that I pass it? > > Thanks, > > Jason Lewis > > Email jasonl...@gmail.com <javascript:> > > Twitter @canweriotnow <http://twitter.com/canweriotnow> > > Blog http://decomplecting.org > > About http://about.me/jason.lewis > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.