Given a list of vectors, I want to return a list of vector whose elements are grouped by index. For example: Given [:a :b] [:c :d] => [:a :c] [:b :d]
For this, I wrote the expression (map (partial conj []) [:a :b] [:c :d]) => [:a :c] [:b :d] It returned the right answer. Now I want wrap the above expression in a function, so I wrote (defn columns [& y] (map (partial conj []) y)) (columns [:a :b] [:c :d]) =>([[:a :b]] [[:c :d]]) Not the right answer. I tried to use the apply function with no success. How can I wrap the expression inside a function. -- 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