On Fri, Sep 18, 2009 at 4:39 PM, Tassilo Horn <tass...@member.fsf.org>wrote:
> Although that doesn't really help, the normal `reduce' doesn't do > better. > > (reduce + (take 1000000 (iterate inc 1))) ; works > (reduce + (take 10000000 (iterate inc 1))) ; OutOfMemoryError Are you sure? I'd expect that with (def integers (iterate inc 1)) (reduce + (take 10000000 integers)) but not with what you wrote. If it does happen with exactly what you wrote then clojure.core/reduce is holding onto the head, or you had a funny substitute reduce in whatever namespace you evaluated those in. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---