Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const incr = x => x + 1
  2. const add = curry((x, y) => x + y)
  3. const sum3 = curry((x, y, z) => x + y + z)
  4.  
  5. liftA(incr, Functor1) === pure(incr).ap(Functor1)
  6. liftA2(add, Functor1, Functor2) === pure(add).ap(Functor1).ap(Functor2)
  7. liftA3(sum3, Functor1, Functor2, Functor3) === pure(sum3).ap(Functor1).ap(Functor2).ap(Functor3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement