mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-12 05:26:43 +00:00
Added a note for ap
We've got this pr like 4 times now thinking that it's a typo.
This commit is contained in:
parent
e918b396ec
commit
d1faf8b4f1
1 changed files with 1 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ Lifting is when you take a value and put it into an object like a [functor](#poi
|
||||||
Some implementations have a function called `lift`, or `liftA2` to make it easier to run functions on functors.
|
Some implementations have a function called `lift`, or `liftA2` to make it easier to run functions on functors.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const liftA2 = (f) => (a, b) => a.map(f).ap(b)
|
const liftA2 = (f) => (a, b) => a.map(f).ap(b) // note it's `ap` and not `map`.
|
||||||
|
|
||||||
const mult = a => b => a * b
|
const mult = a => b => a * b
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue