2008/8/30 Parth Malwankar <[EMAIL PROTECTED]>

>
> vector takes individual elements as arguments and map
> returns a list. If we simply (vector (map ..)) the entire
> list returned by map is seen as a single element. Hence
> 'apply'.
>
> user=> (vector 1 2 3)
> [1 2 3]
> user=> (map inc [1 2 3])
> (2 3 4)
> user=> (vector (map inc [1 2 3]))
> [(2 3 4)]
> user=> (apply vector (map inc [1 2 3]))
> [2 3 4]
> user=>
>
> Parth
>

Thanks for taking the time to reply Parth, it was the point of the vector
call rather than the apply that was confusing me.

R.

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to