mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
core: fix example in Array.reduce (thanks @Emiluren)
This commit is contained in:
parent
99bf013b81
commit
a67c33d2f5
@ -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