simply don't put a for inside a for: (for [x (range 5) y (range 5)] y)
Hope this helps. JM On 19 oct, 06:57, Rising_Phorce <josh.fe...@gmail.com> wrote: > Nested For(s) produce lists of lists: > > =>(for [x (range 5)] > (for [y (range 5)] > y)) > > ((0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4)) > > I want to use for(s) in order to use the loop counters from the > bindings, but can I produce a list of values (flattened) without > having to flatten the resultant list? > > (0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4) > > Thanks. -- 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