I see that you can pass extra args to `apply` --- between the func and the 
coll args --- and `apply` will prepend the extras to the coll before 
proceeding. For example, these all work:

    (apply + [1 2 3 4])
    (apply + 1 2 [3 4])
    (apply + 1 2 '(3 4))

While thinking about how the following works:

~~~
(apply map vector [[:a :b :c]
                   [:i :j :k]
                   [:x :y :z]])
~~~

I found this:

~~~
some-app.core=> (apply map [vector [:a :b :c] [:i :j :k] [:x :y :z]])
([:a :i :x] [:b :j :y] [:c :k :z])

some-app.core=> (apply map '(vector [:a :b :c] [:i :j :k] [:x :y :z]))
ArityException Wrong number of args (3) passed to: Symbol  
clojure.lang.AFn.throwArity (AFn.java:429)
~~~

Why does it fail when I pass a list there instead of a vector?

-- 
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/d/optout.

Reply via email to