core: Small fix in fold docs

Adaptors are things that take iterators and adapt them into other
iterators. With this definition, fold is just a usual method, because it
doesn't normally make an iterator.
This commit is contained in:
Ulrik Sverdrup 2017-09-18 21:18:15 +02:00
parent efceda220e
commit ffd171e47f

View File

@ -1341,7 +1341,7 @@ pub trait Iterator {
(left, right) (left, right)
} }
/// An iterator adaptor that applies a function, producing a single, final value. /// An iterator method 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. The closure returns the value that /// arguments: an 'accumulator', and an element. The closure returns the value that