This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scheme style auto-resizing hashtable (fwd)



marko.kohtala@ntc.nokia.com writes:
> I lost the beginning of your discussion, but could your iterators be a
> cons cell where the cdr value is delayed?
> 

You've just reinvented streams (mentioned in an earlier post) - SICP
covers them pretty extensively.

> This would be neater, if cdr, map and for-each implicitly forced the
> cdr, but for the below example I define ++ to replace cdr.
> 

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.

 - Maciej