[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Various comments
+---------- On May 1, scgmille@xxxxxxxxxxxxxxxxxx said:
> The short answer is that while an iterator can easily be functional and
> efficient (because it usually only needs a small amount of state, like a
> pointer), a datastructure may not be. Take as an example an actively
> balanced tree. A functional version of remove may have to do a lot of
> work to modify the tree, but even more if its not allowed to affect the
> original (possibly as bad as copying the entire tree). At best this
> creates a lot of extra GC pressure.
Having only functional iterators creates often-needless GC pressure.
Please add iterator-next! so we can iterate over our collections without