Created
January 1, 2014 16:09
-
-
Save wweic/8209136 to your computer and use it in GitHub Desktop.
OCaml typing weirdness
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 atype = {a : int} | |
type btype = {a : int; b : int} | |
let accept {a = x} = x | |
(* | |
---> val accept : btype -> int = <fun> | |
select the last record type which contains the fields | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment