Skip to content

Instantly share code, notes, and snippets.

@expede
Last active October 12, 2016 09:32
Show Gist options
  • Save expede/8a7fa6f1f6f50e14b836fb167e80506c to your computer and use it in GitHub Desktop.
Save expede/8a7fa6f1f6f50e14b836fb167e80506c to your computer and use it in GitHub Desktop.
Monad laws
return a >>= f == f a -- Left Identity
m >>= return == m -- Right Identity
(m >>= f) >>= g == m >>= (\x -> f x >>= g) -- Associativity
-- ...plus all applicative functor laws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment