diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-07-08 20:21:05 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-07-08 20:21:05 -0500 |
commit | 49b1053086af11a3fe8a143dfb981dd5bd11c748 (patch) | |
tree | 5c2625c89391bfa5c804de8e7dd37b05da83e455 | |
parent | 98f9bc368bf1a2e37fd85baa785353999df80cbb (diff) |
slight rewording
-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: |