On Thu, Apr 23, 2009 at 9:44 AM, Laurent PETIT <[email protected]> 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 <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to