Created
January 28, 2014 22:00
-
-
Save horsdal/8677391 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
public static TRes Match(this FSharpOption opt, Func some, Func none) | |
{ | |
if (FSharpOption.get_IsSome(opt)) | |
return some.Invoke(opt.Value); | |
else | |
return none.Invoke(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some angle bracket stripping going on - I assume it actually looks like this; https://gist.github.com/bartelink/8720521