Skip to content

Instantly share code, notes, and snippets.

@horsdal
Created January 28, 2014 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save horsdal/8677391 to your computer and use it in GitHub Desktop.
Save horsdal/8677391 to your computer and use it in GitHub Desktop.
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();
}
@bartelink
Copy link

Some angle bracket stripping going on - I assume it actually looks like this; https://gist.github.com/bartelink/8720521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment