Imagine, we have a range like this:
const iterator = range(0, 4, 2)
Then we get
and both iterator.done and, let's say, iterator.exhausted would be true.
ALright, now image this:
const iterator = range(0, 5, 2)
This would also yield
but now, iterator.done, while iterator.exhausted would be false. A hypothetical iterator.remainder would be 1.
Would anyone need that? Has this already been considered?
Imagine, we have a range like this:
Then we get
and both
iterator.doneand, let's say,iterator.exhaustedwould betrue.ALright, now image this:
This would also yield
but now,
iterator.done, whileiterator.exhaustedwould befalse. A hypotheticaliterator.remainderwould be1.Would anyone need that? Has this already been considered?