> why inc can't take each element and incr it giving the result ... 2 3 4 5 > thanks in advance
apply works as if you were calling the function with the elements of the vector. In other words: (apply inc [1 2 3 4 5) ==is like saying===> (inc 1 2 3 4 5) Which is not what you want. However, the following will with each individual element in the vector, call a function and return a new sequence with the results in each subsequent slot: (map inc [1 2 3 4 5] ;=> (2 3 4 5 6) -- 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