Created
February 5, 2015 19:44
-
-
Save bjartwolf/729b4a644ad8ed758f98 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Rod = Dagger | Sword | Fork | |
type Plate = GoldPlate | SilverPlate | BronzePlate | |
type Bottom = Rod | Plate | |
type shish<'A> = | |
Bottom of 'A | |
| Onion of shish<'A> | |
| Lamb of shish<'A> | |
| Tomato of shish<'A> | |
let a = Onion(Onion(Bottom GoldPlate)) | |
let b = Onion(Lamb(Onion(Tomato(Bottom Sword)))) | |
a.Dump() | |
b.Dump() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment