Created
April 26, 2015 14:01
-
-
Save SteveGilham/4acbf564c4a7f1f7118d to your computer and use it in GitHub Desktop.
I/O monad operations
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
let ReturnIO x = IO (fun () -> x) | |
let FailIO = IO (fun () -> raise IOFailure) | |
let (>>=) m f = IO (fun () -> RunIO(f(RunIO m)));; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment