Skip to content

Do we need an indicator whether the range was completely fulfilled? #72

@shaedrich

Description

@shaedrich

Imagine, we have a range like this:

const iterator = range(0, 4, 2)

Then we get

[ 0, 2, 4 ]

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

[ 0, 2, 4 ]

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions