]> git.lizzy.rs Git - rust.git/commitdiff
Clarify ambiguous wording in fold() docs
authorBrian Bowman <seeker14491@gmail.com>
Fri, 4 Mar 2016 07:09:23 +0000 (01:09 -0600)
committerBrian Bowman <seeker14491@gmail.com>
Fri, 4 Mar 2016 07:09:23 +0000 (01:09 -0600)
To me it was unclear whether 'it' referred to the fold function, or the closure.

src/libcore/iter.rs

index d6bd9dbf4bde222938fdcefead9918e7f30925db..a730b9bd518da4edd00b05545e0a8aa2c02cbe67 100644 (file)
@@ -1532,7 +1532,7 @@ fn partition<B, F>(self, mut f: F) -> (B, B) where
     /// 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