Skip to content

Some methods do not support "input" iterators #83

@drewdzzz

Description

@drewdzzz

So-called input iterators (in terms of C++) are iterators that can only be advanced forward and cannot be saved to iterate over the same elements one more time. Some methods (is_null, cycle, drop_while) save old state to iterate from it later, so they don't work properly with them. For example, is_null copies the state and then advances the iterator with copied state to see if iterator yields something. The problem is, once you advanced an "input" iterator, it can never be advanced back, so the fact that you copied state doesn't really help.

Examples of "input" iterators: iterator reading from console/socket, database cursor.

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