Skip to content

Commit 72fe695

Browse files
committed
Since the definition of reduceRight wan't correct, the definition of reduce doesn't seem to be right either. Changed both to mdn's definition.
1 parent c39c733 commit 72fe695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ An object that has a `concat` function that combines it with another object of t
800800

801801
## Foldable
802802

803-
An object that has a `reduce` function that can transform that object into some other type.
803+
An object that has a `reduce` function that applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value.
804804

805805
```js
806806
const sum = (list) => list.reduce((acc, val) => acc + val, 0)

0 commit comments

Comments
 (0)