Skip to content

Instantly share code, notes, and snippets.

@acgetchell
Last active August 8, 2016 22:47
Show Gist options
  • Save acgetchell/926994 to your computer and use it in GitHub Desktop.
Save acgetchell/926994 to your computer and use it in GitHub Desktop.
An F# union type representing the F# type system. From Jon Harrop's "Visual F# 2010 for Technical Computing"
type 'a ty =
| Abbrev of 'a list * string
| Function of 'a ty * 'a ty
| Record of string * (string * 'a) list
| Tuple of 'a ty list
| Union of string * (string * 'a list) list;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment