-
-
Save anonymous/9be4af27a25707faf403 to your computer and use it in GitHub Desktop.
module record field
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
module P = struct | |
type t = {l1 : int; l2: bool} | |
type s = {l1: bool; l2: int} | |
end;; | |
(* val test : P.s -> bool = <fun> *) | |
let test r = r.P.l1 | |
(* val test2 : P.s -> int = <fun> *) | |
let test2 r = r.P.l2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment