Skip to content

Instantly share code, notes, and snippets.

@gsg
Created November 16, 2015 18:16
Show Gist options
  • Save gsg/7b2a732570f2a1e11a28 to your computer and use it in GitHub Desktop.
Save gsg/7b2a732570f2a1e11a28 to your computer and use it in GitHub Desktop.
type (_, _) t =
| Default : ('a, 'a) t
| Given : ('a, 'b) t
let test : type a b . (a, b) t -> (a -> b) -> a -> b =
fun m f arg ->
match m with
| Default -> f arg
| Given -> f arg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment