On Mon, Apr 4, 2011 at 7:07 PM, Ken Wesson <[email protected]> wrote: >> I summarised my issues with the different solutions. Since things got >> a bit philosophical I wrote up a short blog post on my point of view: >> http://bit.ly/hInw0J > > I'm surprised to hear that partition-by is not very lazy, and will > hang on an infinite seq. Fortunately, that can be fixed
Oh, and it also doesn't hold onto the head: user=> (nth (my-partition-by #(quot % 3) (iterate inc 0)) 10000000) ; after a minute or so (30000000 30000001 30000002) user=> (def q (iterate inc 0)) #'user/q user=> (nth (my-partition-by #(quot % 3) q) 10000000) ; chugs for over 15 minutes, and then #<CompilerException java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:93)> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
