-
Notifications
You must be signed in to change notification settings - Fork 0
/
lib.mli
41 lines (31 loc) · 1.33 KB
/
lib.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(** Library *)
module Set : sig
module type S = sig
(** Set module from the standard library.
@see < http://caml.inria.fr/pub/docs/manual-ocaml/libref/Set.S.html > [Set.S] (caml.inria.fr) *)
include Set.S
(** Build a set from a list. *)
val from_list : elt list -> t
(** String reprensetation of a map given a [to_string] function for elements. *)
val to_string : (elt -> string) -> t -> string
end
module Make (Ord : Set.OrderedType) : S with type elt = Ord.t
end
module Map : sig
module type S = sig
(** Map module from the standard library.
@see < http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.S.html > [Map.S] (caml.inria.fr) *)
include Map.S
(** Build a map from an association list. *)
val from_list : (key * 'a) list -> 'a t
(** String representation of a map given [to_string] functions for keys and
values. *)
val to_string : (key -> string) -> ('a -> string) -> 'a t -> string
end
module Make (Ord : Map.OrderedType) : S with type key = Ord.t
end
(** Total ordering on lists given a [compare] function on elements. *)
val list_compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int
(** Comparison combinator. [a $ b] returns b if a = 0 or a otherwise. It can
be chained to construct a lexicographic order. *)
val ($) : int -> int -> int