Skip to content

Add first and first_mut methods #507

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
Oct 25, 2018

Conversation

jturner314
Copy link
Member

These are useful for getting an initial value when iterating over an array (e.g. when calculating the minimum element with fold).

Their signatures match the .first() and .first_mut() methods on slices.

@jturner314 jturner314 mentioned this pull request Oct 24, 2018
These are useful for getting an initial value when iterating over an
array (e.g. when calculating the minimum element with `fold`).
@jturner314 jturner314 merged commit 9820166 into rust-ndarray:master Oct 25, 2018
@jturner314 jturner314 deleted the first-elem branch October 25, 2018 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant