[gambit-list] Table iterators

Christian Jaeger christian at pflanze.mine.nu
Fri Oct 31 18:11:14 EDT 2008


Taylor R Campbell wrote:
> that they don't behave nicely when
> the procedures passed to them modify the table.
>   

Is there an efficient algorithm around that problem (i.e. short of 
copying the whole table or their keys at once first)?

Anyway, the same problem holds true for example for Perl's hash table 
iterators. It's just one of the caveats one has to know about.

Btw, there is at least a |table-for-each| procedure already, and 
documented in the Gambit docs. Actually it is even more restrictive than 
just explicit modification. (Wondering why, no time to check now.)

Christian.




More information about the Gambit-list mailing list