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:
Brian Bowman 2016-03-04 01:09:23 -06:00
parent 8e261d12e3
commit 84e6e04d83

View File

@ -1532,7 +1532,7 @@ pub trait Iterator {
/// An iterator adaptor that applies a function, producing a single, final value.
///
/// `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 initial value is the value the accumulator will have on the first