On Aug 7, 2009, at 3:04 PM, tsuraan wrote:
> > Most languages I've used define a zip method, where you can take two > lists and get a list of the pairs of elements in those lists. So, > (zip '(1 2 3) '(4 5 6)) would give ([1 4] [2 5] [3 6]). Does clojure > have a core function like that? I've been poking around, but all I'm > finding is zipmap, which is close but it builds a map instead of a > list of pairs. Writing my own isn't a big deal, but it seems like > something that has to be in the core somewhere. map can do this. user> (map vector '(1 2 3) '(4 5 6)) ([1 4] [2 5] [3 6]) — Daniel Lyons --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---