Int_set.S
type elt
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
Returns the set itself when the element is already present.
val singleton : elt -> t
val remove : elt -> t -> t
Returns the set itself when the element is not present.
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val compare : t -> t -> int
A total order, compatible with equal.
equal
val subset : t -> t -> bool
val disjoint : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val map : (elt -> elt) -> t -> t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
Returns the smallest element.
val of_list : elt list -> t
val to_seq : t -> elt Stdlib.Seq.t
val compare_cardinal_with : t -> int -> int
compare_cardinal_with s n is compare (cardinal s) n.
compare_cardinal_with s n
compare (cardinal s) n
val to_list_bounded : int -> t -> elt list option
to_list_bounded n s returns Some (elements s) if s has at most n elements, and None otherwise.
to_list_bounded n s
Some (elements s)
s
n
None