Add description of fold function arguments.
This commit is contained in:
parent
6dcc0e5631
commit
3ad1c83540
@ -611,7 +611,7 @@ pub trait IteratorExt: Iterator + Sized {
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3, 4, 5];
|
||||
/// assert!(a.iter().fold(0, |a, &b| a + b) == 15);
|
||||
/// assert!(a.iter().fold(0, |acc, &item| acc + item) == 15);
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user