Hi, Not sure what you are trying to do, but xxx is a lazy seq, thus it can only be consumed sequentially and fold falls back to reduce
You need a vector. Las Sent from my phone On Apr 26, 2013 4:46 PM, "Stanislav Yurin" <jusk...@gmail.com> wrote: > I was assuming that following code will fold in parallel, but it is > reduced sequentially > > (require '[clojure.core.reducers :as r]) > (defn test1 > [x] > (Thread/sleep 1000) > (println (str "Finished:" x)) > x) > (def xxx (r/map test1 (range 100))) > (r/fold + xxx) > > What am I doing wrong? > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.