-
-
Save cemerick/05a519b88cd479c88c5e2f8d80583071 to your computer and use it in GitHub Desktop.
This file contains 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 j = [`J of int] | |
type k = [`K of int] | |
type jk = [ j | k ] | |
let compatFun (type a) : a -> (a -> int) = | |
function | #j -> fun (`J x) -> x | |
| #k -> fun (`K x) -> x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment