On Fri, Jan 20, 2012 at 3:57 PM, Steve Miner <stevemi...@gmail.com> wrote:
>
> 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])

I had something else going on inside #() for a while, and later just
switched to vector. Oops.

Lars Nilsson

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