OK, I see what you're saying now.  Range doesn't cause problems
because it's not coded in a way that links to a bunch of other cells.
So it's plausible that the problem is the way filter hangs on to the
collection while generating the rest (since it's not a tail-recursive
call in that case).

This is a real problem.  It means that a whole range of things can't
be coded naturally with lazy sequences.

Maybe LazyCons shouldn't cache.  Make LazyCons something that executes
its function every time.  For most things, it's not a problem because
sequences are often traversed only once.  If a person wants to cache
it for multiple traversals, he can explicitly call cache-seq on it.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to