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

forEach should provide index to callback #30

Open
jscheid opened this issue Oct 23, 2021 · 1 comment · May be fixed by #31
Open

forEach should provide index to callback #30

jscheid opened this issue Oct 23, 2021 · 1 comment · May be fixed by #31

Comments

@jscheid
Copy link

jscheid commented Oct 23, 2021

Thanks for an extremely useful library.

Having the index in the forEach callback would be handy, and make it more like Array.forEach.

Workaround is to cast to an array first, as in iterate(...).toArray().forEach(...) but that obviously defeats much of the purpose.

@vitaly-t
Copy link

@jscheid
Since there is no answer here, iter-ops does provide the index.

RebeccaStevens added a commit to RebeccaStevens/iterare that referenced this issue Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants