fold_first iterator consumer#106348
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
You need an ACP first. |
This comment has been minimized.
This comment has been minimized.
ced5ee3 to
bd35161
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #108421) made this pull request unmergeable. Please resolve the merge conflicts. |
how many iterator adapters/consumers are we going to add...
rust-lang/libs-team#157
This simple extension on fold is very similar to reduce, but on numerous occasions I have wanted to reduce but into a different type. This means I manually re-implement reduce with fold every time I need that.
This implements a
fold_first(please bikeshed) which provides aninitmethod.reduceis re-implemented asfold_first(identity, f)Similarly, I've implemented the try/rfold variants too