Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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