Last active
October 12, 2016 09:32
-
-
Save expede/8a7fa6f1f6f50e14b836fb167e80506c to your computer and use it in GitHub Desktop.
Monad laws
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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