Guile Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme style auto-resizing hashtable (fwd)




marko.kohtala@ntc.nokia.com writes:
> > stream-map is well-known (and returns another stream), stream-for-each
> > would be pretty useless, as you'd generate even more garbage than if
> > you were just processing a normal list.
> 
> Why would stream-for-each be useless? Isn't it better than a list
> since you need not have the complete list in memory, but garbage
> collection can collect the beginning of the list if so needed?
> 

At first I thought this was not the case, that something would
maintain a pointer to the head, but I realized that in typical Scheme
programming style just the tail recursion requirement would generally
eliminate the head pointer. See my other post on the subject.

 - Maciej

Guile Home | Main Index | Thread Index