1Unit(3) OCaml library Unit(3)
2
3
4
6 Unit - Unit values.
7
9 Module Unit
10
12 Module Unit
13 : sig end
14
15
16 Unit values.
17
18
19 Since 4.08
20
21
22
23
24
25
26
27 The unit type
28 type t = unit =
29 | ()
30
31
32 The unit type.
33
34 The constructor () is included here so that it has a path, but it is
35 not intended to be used in user-defined data types.
36
37
38
39 val equal : t -> t -> bool
40
41
42 equal u1 u2 is true .
43
44
45
46 val compare : t -> t -> int
47
48
49 compare u1 u2 is 0 .
50
51
52
53 val to_string : t -> string
54
55
56 to_string b is "()" .
57
58
59
60
61
62OCamldoc 2021-07-22 Unit(3)