It does make me wonder, however, if having the lazy-seq cache things
is sort of conflating laziness and consistency, since as you point
out, not all ISeq implementations do any sort of caching.

I wonder if it would be interesting to decompose it into 'lazy-
seq' (uncached), and 'cached-seq'. I understand that this is unlikely
to ever happen, but it occurred to me last night when I was idly
thinking about this.

On Nov 4, 2:03 pm, Paul  Mooser <taron...@gmail.com> wrote:
> I completely understand the difference between the ISeq interface, and
> the particular implementation (lazy-seq) that results in these
> problems. It would be fairly straightforward, I think, to write some
> kind of uncached-lazy-seq which doesn't exhibit these problems, but
> I've felt that is sidestepping and issue and introduces issues of its
> own.
>
> On Nov 4, 1:16 pm, Chouser <chou...@gmail.com> wrote:
>
>
>
> > Both those examples retain the head, but since 'incs' isn't
> > a lazy-seq, the intermediate values can be garbage-collected.
> > Note the difference between the seq abstraction and the lazy-seq
> > implementation.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to