Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created November 9, 2011 19:23
Show Gist options
  • Save joshcough/1352619 to your computer and use it in GitHub Desktop.
Save joshcough/1352619 to your computer and use it in GitHub Desktop.
box
> let f<'a>(a:'a) = match box a with | :? string as s -> s | _ -> "hi";;
val f : 'a -> string
> f(1);;
val it : string = "hi"
> f("hello")
;;
val it : string = "hello"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment