Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eager iterators #139

Closed
MartinBernstorff opened this issue Mar 7, 2024 · 0 comments · Fixed by #142
Closed

feat: eager iterators #139

MartinBernstorff opened this issue Mar 7, 2024 · 0 comments · Fixed by #142
Assignees

Comments

@MartinBernstorff
Copy link
Owner

class EagerIter(Iter[T]):
    def __init__(self, iterable: Iterable[T]) -> None:
        self._iter = list(iterable)
        self._current_index: int = 0

All this lacks is overloads for .flatten etc. Should be quite doable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant