Hey Meikel, On Jun 17, 10:48 pm, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > On Jun 18, 1:35 am, viksit <vik...@gmail.com> wrote: > > > (loop for x in '(a b c d e) > > for y in '(1 2 3 4 5) > > collect (list x y) ) > > > ((A 1) (B 2) (C 3) (D 4) (E 5)) > > > Are there any good (and idiomatic) methods to achieve this using a > > Clojure loop construct? > > user=> (map vector [:a :b :c :d :e] [1 2 3 4 5]) > ([:a 1] [:b 2] [:c 3] [:d 4] [:e 5])
Oh yes, thanks. I know about using the map method - I was just wondering if Clojure's loop supports (or has any plans to support) the loop construct as in CL (http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/ node235.html). And if not, then are there any ways to "loop" through 2 lists in parallel. Cheers Viksit > > Sincerely > Meikel -- 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