2010/7/7 Cameron <cpuls...@gmail.com>:
> Thanks everyone! I certainly have my solution; but, I'm still a bit
> confused. Here's another example...
>
> user=> (defmacro foo [coll] `(map identity ~coll))
> #'user/foo
> user=> (foo (list 1 2 3))
> (1 2 3)
>
> In this example, I pass an explicit list and all I have to do is
> unquote 'coll'. How is passing an explicit list any different than
> having it destructured via '&' in the argument vector?


You're not passing a list. You're passing the code for creating a list.
Use macroexpand, it's your friend

-- 
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

Reply via email to