Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Created February 5, 2015 19:44
Show Gist options
  • Save bjartwolf/729b4a644ad8ed758f98 to your computer and use it in GitHub Desktop.
Save bjartwolf/729b4a644ad8ed758f98 to your computer and use it in GitHub Desktop.
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