Skip to content

Rename .visit() to .for_each() #907

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

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

jturner314
Copy link
Member

This is more consistent with std::iter::Iterator and ndarray::Zip.

See also #894, which is similar.

By the way, what do you think about renaming the existing (private) .unordered_foreach_mut() method to .for_each_mut() and making it public? (I'd also add an explicit lifetime parameter, like the one in .visit(), to make it more versatile.)

This is more consistent with `std::iter::Iterator` and `ndarray::Zip`.
@bluss
Copy link
Member

bluss commented Feb 3, 2021

Both ideas sound good

@bluss bluss merged commit cb544a0 into rust-ndarray:master Feb 3, 2021
@jturner314 jturner314 deleted the rename-visit-to-for_each branch February 3, 2021 20:23
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 this pull request may close these issues.

2 participants