Created
November 5, 2017 13:50
-
-
Save deque-blog/02aa4b79720d8f5e657abc8788fee84b 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 Monad IOSpec where | |
(>>=) ma f = recur ma where | |
recur (Pure a) = f a | |
recur (ReadLine cont) = ReadLine (recur . cont) | |
recur (WriteLine s next) = WriteLine s (recur next) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment