mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 10:36:45 +00:00
fix: fix the lift example error
This commit is contained in:
parent
273175df14
commit
0cd5973ddf
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
|
||||
|
||||
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`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue