Clarify value of base on first iteration of fold

The original text was a bit confusing as it read as if the accumulator was given the value of base on the first iteration.
This commit is contained in:
Sven Steinbauer 2017-06-02 14:51:51 +01:00 committed by GitHub
parent 5ee93a0fb8
commit 5a388b42af
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ is an element called the *base*. The second is a closure that itself takes two
arguments: the first is called the *accumulator*, and the second is an
*element*. Upon each iteration, the closure is called, and the result is the
value of the accumulator on the next iteration. On the first iteration, the
base is the value of the accumulator.
base is assigned the value of the accumulator.
Okay, that's a bit confusing. Let's examine the values of all of these things
in this iterator: