On Thu, Apr 23, 2009 at 9:44 AM, Laurent PETIT <laurent.pe...@gmail.com> wrote: > > Hi Meikel, > > It seems to me that your version is the only safe one so far, that > would succesfully indefinitely return values with this test: > > (dorun (mystery-function true? :foo (repeat true))) > > Mine, a new version of mine I'll never bother to publish, and > Christophe's all retain head. > To explain on Christophe's one for example: > > It uses (split-with) which, in case pred always match coll elements, > will retain the head of coll in etc, while eating more and more > elements of coll via running on run :
hmmm... Good point. user=> (nth (mystery-function (partial > 6000000) (iterate inc 0)) 10000000) java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:0) -- Michael Wood <esiot...@gmail.com> --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---