Clarify ambiguous wording in fold() docs
To me it was unclear whether 'it' referred to the fold function, or the closure.
This commit is contained in:
parent
8e261d12e3
commit
84e6e04d83
1 changed files with 1 additions and 1 deletions
|
@ -1532,7 +1532,7 @@ pub trait Iterator {
|
||||||
/// An iterator adaptor that applies a function, producing a single, final value.
|
/// An iterator adaptor that applies a function, producing a single, final value.
|
||||||
///
|
///
|
||||||
/// `fold()` takes two arguments: an initial value, and a closure with two
|
/// `fold()` takes two arguments: an initial value, and a closure with two
|
||||||
/// arguments: an 'accumulator', and an element. It returns the value that
|
/// arguments: an 'accumulator', and an element. The closure returns the value that
|
||||||
/// the accumulator should have for the next iteration.
|
/// the accumulator should have for the next iteration.
|
||||||
///
|
///
|
||||||
/// The initial value is the value the accumulator will have on the first
|
/// The initial value is the value the accumulator will have on the first
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue