Created
April 26, 2015 13:58
-
-
Save SteveGilham/c3a54b82b2cdccd92fa7 to your computer and use it in GitHub Desktop.
Option monad definition
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
type OptionBuilder() = | |
member self.Bind(input, operation) = Option.bind operation input | |
member self.Delay (operation:(unit -> 'a option)) = operation () | |
member self.Return input = Some input | |
member self.ReturnFrom (input : 'a option) = input | |
let option = OptionBuilder();; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment