Skip to content

Various additions to core::iter #1826

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 5 commits into from
Feb 13, 2012
Merged

Various additions to core::iter #1826

merged 5 commits into from
Feb 13, 2012

Conversation

brson
Copy link
Contributor

@brson brson commented Feb 13, 2012

This adds min, max, reverse, count, and foldr functions to core::iter. foldr is implemented the slow way. I did some experimenting with a riterable interface but ran into some type checking problems.

The only thing interesting here is that I changed the signatures of foldl and foldr to move the accumulator value instead of copying.

@nikomatsakis have a look.

@nikomatsakis
Copy link
Contributor

This all looks reasonable to me.

brson added a commit that referenced this pull request Feb 13, 2012
Various additions to core::iter
@brson brson merged commit 2784314 into rust-lang:master Feb 13, 2012
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