Skip to content

chain_with for lazy second iterator construction #370

Open
@Ten0

Description

@Ten0

It might be useful to add a chain_with function to the itertools that does the same thing as chain but lazily calling the function that builds the iterator.

This would make chaining with iterators computed in another thread easier.

The workaround described here is somewhat limited because map is not an FnOnce even though the way it is used provides the guarantee it will only be used once.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions