On Jan 20, 2012, at 2:41 PM, Lars Nilsson wrote:

>  => (map #(vector %1 %2) [1 2 3] ['a 'b 'c])
>  ([1 a] [2 b] [3 c])

Sorry if I'm drifting a bit off topic, but I just wanted to point out that it's 
convenient to use just the function name if the arguments are already in the 
appropriate order.  Also, it is sometimes convenient to quote a vector rather 
than the individual elements.  For example, the following is an equivalent 
expression:

(map vector [1 2 3] '[a b c])

Of course, wrapping the expression in dorun is necessary if you care about 
forcing side-effects.

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