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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user