Skip to content

Instantly share code, notes, and snippets.

/m

Created March 31, 2015 20:59
Show Gist options
  • Save anonymous/9be4af27a25707faf403 to your computer and use it in GitHub Desktop.
Save anonymous/9be4af27a25707faf403 to your computer and use it in GitHub Desktop.
module record field
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