xxxxxx@freenetproject.org wrote:
> Well, they are still iterators, the difference is that instead of an
> iterator object which is mutated as in other languages, we behave
> functionally, returning a new state object from iterator-next.
My question is: is the word "iterator" common for this kind
of non-mutable iterator? If not, perhaps another name, like
"position" might be better. "cursor" is another possibility.
One problem with the proposed model is that it requires *three*
function calls for each iteration - and they all have relatively
long names. This cries out for a macro to make iteration less
verbose. (There are also performance implications of using three
calls per iteration.)
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/