From 3ad1c8354051174921c04c6b376fc205790f90b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= Date: Mon, 2 Mar 2015 22:31:01 +0100 Subject: [PATCH] Add description of fold function arguments. --- src/libcore/iter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 32225b90f6b..d5e891a156e 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -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")]