mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 10:36:45 +00:00
Update Applicative Functor example (#106)
Update for consistency with commit c9590ea.
This commit is contained in:
parent
c9590ea092
commit
8d10ce9b32
1 changed files with 1 additions and 1 deletions
|
|
@ -541,7 +541,7 @@ const arg2 = [4, 5];
|
|||
// combining function - must be curried for this to work
|
||||
const add = (x) => (y) => x + y;
|
||||
|
||||
const partiallyAppliedAdds = [add].ap(arg1); // [(y) => 1 + y, (y) => 2 + y]
|
||||
const partiallyAppliedAdds = [add].ap(arg1); // [(y) => 1 + y, (y) => 3 + y]
|
||||
```
|
||||
|
||||
This gives you an array of functions that you can call `ap` on to get the result:
|
||||
|
|
|
|||
Loading…
Reference in a new issue