diff options
-rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -370,14 +370,14 @@ First, you declare and initialize an accumulator variable. In the above that is the form `(sum 0)`, which declares a variable called `sum` initialized to `0`. -Next you put your iteration variable and generator form. These have -the same syntax as `for`. So in the above we bind a variable `x` to -each successive value generated by `(times 10)`. +Next comes your iteration variable and generator form. These have the +same syntax as `for`. So in the above we bind a variable `x` to each +successive value generated by `(times 10)`. Finally, you write a *single update form* whose value becomes bound to your accumulator variable. In the above example `sum` is set to `(+ sum x)`. -The `fold` form returns the accumulator when finished. +The `fold` form returns the final value of the accumulator. Here are some more folds: |