Skip to content

Commit 84e6e04

Browse files
committed
Clarify ambiguous wording in fold() docs
To me it was unclear whether 'it' referred to the fold function, or the closure.
1 parent 8e261d1 commit 84e6e04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ pub trait Iterator {
15321532
/// An iterator adaptor that applies a function, producing a single, final value.
15331533
///
15341534
/// `fold()` takes two arguments: an initial value, and a closure with two
1535-
/// arguments: an 'accumulator', and an element. It returns the value that
1535+
/// arguments: an 'accumulator', and an element. The closure returns the value that
15361536
/// the accumulator should have for the next iteration.
15371537
///
15381538
/// The initial value is the value the accumulator will have on the first

0 commit comments

Comments
 (0)