On Fri, Aug 7, 2009 at 5: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
> map can do this.
>
> user> (map vector '(1 2 3) '(4 5 6))
> ([1 4] [2 5] [3 6])
Yeah, that works pretty well. Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
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
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, whi