Created
November 16, 2017 18:47
-
-
Save deque-blog/7ba19ef39a12e55d190d5db45d2b0735 to your computer and use it in GitHub Desktop.
This file contains 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
implementation Functor IOSpec where | |
map fn expr = Bind expr (Pure . fn) | |
implementation Applicative IOSpec where | |
pure = Pure | |
fExpr <*> aExpr = Bind fExpr (\f => map f aExpr) | |
implementation Monad IOSpec where | |
(>>=) = Bind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment