On Tue, Dec 1, 2009 at 4:09 AM, samppi <[email protected]> wrote: > The title says it all. Is there a nice, concise, Clojurey way to > convert a vector [a b c d] into [[[a b] c] d]? It's fine if the > vectors are sequences instead. I can't think of a way without a loop, > but I suspect there's a much shorter way.
user=> (reduce vector [1 2 3 4]) [[[1 2] 3] 4] martin -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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
