mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 21:53:56 +00:00
Rollup merge of #25144 - killercup:docs/iter-fold-reduce, r=steveklabnik
Enhance Google-ability of `.fold()` by mentioning 'reduce' and 'inject' in the docs. Motivation: [This thread on users.rust-lang.org](https://users.rust-lang.org/t/find-the-shortest-string-in-a-vector/1247)
This commit is contained in:
commit
0d347e1620
@ -602,6 +602,8 @@ pub trait Iterator {
|
||||
/// Performs a fold operation over the entire iterator, returning the
|
||||
/// eventual state at the end of the iteration.
|
||||
///
|
||||
/// This operation is sometimes called 'reduce' or 'inject'.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user