mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-24 22:44:26 +00:00
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:
parent
efceda220e
commit
ffd171e47f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user