mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-11 21:16:43 +00:00
Merge pull request #147 from Sean-Lan/fix/lift
fix: fix the lift example error
This commit is contained in:
commit
742ea02c49
1 changed files with 1 additions and 1 deletions
|
|
@ -456,7 +456,7 @@ const mult = a => b => a * b
|
||||||
const liftedMult = liftA2(mult) // this function now works on functors like array
|
const liftedMult = liftA2(mult) // this function now works on functors like array
|
||||||
|
|
||||||
liftedMult([1, 2], [3]) // [3, 6]
|
liftedMult([1, 2], [3]) // [3, 6]
|
||||||
liftA2((a, b) => a + b)([1, 2], [3, 4]) // [4, 5, 5, 6]
|
liftA2(a => b => a + b)([1, 2], [3, 4]) // [4, 5, 5, 6]
|
||||||
```
|
```
|
||||||
|
|
||||||
Lifting a one-argument function and applying it does the same thing as `map`.
|
Lifting a one-argument function and applying it does the same thing as `map`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue