Skip to content

Instantly share code, notes, and snippets.

@kolektiv
Created April 6, 2015 14:21
Show Gist options
  • Save kolektiv/5de66e9804defa9eccfc to your computer and use it in GitHub Desktop.
Save kolektiv/5de66e9804defa9eccfc to your computer and use it in GitHub Desktop.
Unions
type Example =
| IntCase of int
| StringCase of string
let intExample = IntCase 5 // type - Example
let stringExample = StringCase "hello"
type ExampleRecord =
{ ExampleField: Example }
let recordExample =
{ ExampleField = IntCase 5 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment