Created
April 6, 2015 14:21
-
-
Save kolektiv/5de66e9804defa9eccfc to your computer and use it in GitHub Desktop.
Unions
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
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