Skip to content

Instantly share code, notes, and snippets.

@eiriktsarpalis
Created October 29, 2013 13:15
Show Gist options
  • Save eiriktsarpalis/7214437 to your computer and use it in GitHub Desktop.
Save eiriktsarpalis/7214437 to your computer and use it in GitHub Desktop.
My favorite new feature in F# 3.1
type Foo =
| A of value : int
| B of enabled : bool * somethingElse : bool
match B (false, false) with
| B(enabled = true) -> true
| B(somethingElse = x) -> x
| _ -> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment