Changes for clojure.core/apply

zkim on Sun, 26 Sep 2010
;; Here's an example that uses the optional second argument, args:

user=> (apply map vector [[:a :b] [:c :d]])
([:a :c] [:b :d])

;; In this example, 'f' = 'map', 'args' = 'vector', and argseq = '[:a :b] [:c :d]',
;; making the above code equivalent to

user=> (map vector [:a :b] [:c :d])
([:a :c] [:b :d]) ;Same answer as above

;; It might help to think of 'map' and 'vector' "slipping inside" the argument list
;; ( '[[:a :b] [:c :d]]' ) to give '[map vector [:a :b] [:c :d]]' , which then 
;; becomes the executable form '(map vector [:a :b] [:c :d])' .
gregg-williams on Tue, 21 Sep 2010
Here's an example that uses the optional second argument, args:

(apply map vector [[:a :b] [:c :d]])

which returns ([:a :c] [:b :d])

In this example, `f` = `map` , `args` = `vector` , and argseq = `[:a :b] [:c :d]`, making the above code equivalent to

(map vector [:a :b] [:c :d])

which gives the same answer.

<br />

It might help to think of `map` and `vector` "slipping inside" the argument list ( `[[:a :b] [:c :d]]` ) to give `[map vector [:a :b] [:c :d]]` , which then becomes the executable form `(map vector [:a :b] [:c :d])` .
gregg-williams on Tue, 21 Sep 2010
Here's an example that uses the optional second argument, args:

(apply map vector [[:a :b] [:c :d]])

which returns ([:a :c] [:b :d])

In this example, `f` = `map` , `args` = `vector` , and argseq = `[:a :b] [:c :d]`, making the above code equivalent to

(map vector [:a :b] [:c :d])

which gives the same answer.