mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Merge pull request #632 from hellerve/fix-array-reduce-example
Fix example in Array.reduce documentation
This commit is contained in:
commit
d0f2c447be
@ -6,7 +6,7 @@ As an example, consider this definition of `sum` based on `reduce`:
|
||||
|
||||
```
|
||||
(defn sum [x]
|
||||
(reduce + 0 x))
|
||||
(reduce &(fn [x y] (+ x @y)) 0 x))
|
||||
```
|
||||
|
||||
It will sum the previous sum with each new value, starting at `0`.")
|
||||
|
Loading…
Reference in New Issue
Block a user