Shameless plug: If you want to do this type of iteration efficiently, try my 
library at https://github.com/jpalmucci/clj-iterate

user> (iter {for x in '(1 2 3)}
      {for y in '(a b c)}
      (println x y))
1 a
2 b
3 c
nil
user> 

Expands into a fast loop/recur form. No intermediate data structures

On Jan 20, 2012, at 8:18 AM, joachim wrote:

> Hi All,
> 
> Here is a simple problem for which I nevertheless can't seem to find
> the right solution: How to run over several sequences in parallel for
> side-effects? Here is one way:
> 
>     (dorun (map some-fn-with-side-effects sequence-1 sequence-2))
> 
> However, I was told that the form "(dorun (map ... ))" indicates that
> doseq should be used instead because it is faster, and I can use
> speed. I think that this is not possible however because doseq only
> allows to loop over a single sequence at a time? I was wondering what
> is the idiomatic clojure way in this case?
> 
> Thanks! Jm.
> 
> -- 
> 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

-- 
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

Reply via email to