: Objective Caml . :
type test = Null | {a : int ; b: int }
let value = { a: 0 ; b : 42 } in print_int value.a
, value Null, a. , Objective Caml . , .
, :
type test = Null | Pair of { a : int ; b : int }
match Pair { a : 0 ; b : 42 } with
| Null -> 0
| Pair p -> p.a
p ? , , , , , , , (, < ; ... >, #type value :> type ).
, . , , :
type test = Null | Pair of int * int