Module type CCHashconsedSet.S

module type S = sig .. end

type elt 
type t 
Set of elements
val empty : t
val singleton : elt -> t
val doubleton : elt -> elt -> t
val mem : elt -> t -> bool
val equal : t -> t -> bool
Fast equality test O(1)
val compare : t -> t -> int
Fast (arbitrary) comparison test O(1)
val hash : t -> int
Fast (arbitrary, deterministic) hash O(1)
val add : elt -> t -> t
val remove : elt -> t -> t
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
Iterate on elements, in no particular order
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
Fold on elements, in arbitrary order
val choose : t -> elt option
val choose_exn : t -> elt
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t

Whole-collection operations


type 'a sequence = ('a -> unit) -> unit 
type 'a gen = unit -> 'a option 
val add_list : t -> elt list -> t
val of_list : elt list -> t
val to_list : t -> elt list
val add_seq : t ->
elt sequence -> t
val of_seq : elt sequence -> t
val to_seq : t -> elt sequence