Oh. The "P" in "REPL" makes it non-lazy and the "let" meant that the printer need only print the last line. Ugh. That is completely obvious in hindsight! Thanks!
I surrounded a few expressions with "dorun" and now both of my Clojure implementations "run" -- or crawl, given the results of timing the first and the second: (first) counter = 2560000 and took 139949 ms. real 2m37.599s user 4m48.874s sys 2m23.225s (second) counter = 2560000 and took 34895 ms. real 0m35.868s user 1m14.625s sys 0m24.035s Not that I should be reading *too* much into my micro-benchmark On Fri, Oct 29, 2010 at 7:07 AM, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > On 29 Okt., 06:58, Brian Ericson <li...@curvybits.org> wrote: > > > (map #(.start %) threads) > > map is not a loop. It creates a lazy sequences which does - nothing. > At least not until it is realised. Here you throw it away > immediatelly. Hence, no work is done. Use doseq instead when your main > objective are side-effects like .start or .join. It works in the repl, > because the repl prints the seq and thus realises it forcing the work > to be done. > > Hope this helps. > > 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<clojure%2bunsubscr...@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