Module Predicate.Make
The Make
functor constructs an implementation for any OrderedType
.
Parameters
Signature
type elt
= Ord.t
The type of the elements in the set.
val empty : t
The empty set.
val full : t
The set of all elements (of type
elm
).
val is_empty : t -> bool
Test whether a set is empty or not.
val is_full : t -> bool
Test whether a set contains the whole type or not.
val add : elt -> t -> t
add x s
returns a set containing all elements ofs
, plusx
. Ifx
was already ins
, thens
is returned unchanged.
val remove : elt -> t -> t
remove x s
returns a set containing all elements ofs
, exceptx
. Ifx
was not ins
, thens
is returned unchanged.