Module Nonempty_set

type (!'a, !'b) t
val add : ('a, 'b) t -> 'a -> ('a, 'b) t @@ portable
val remove : ('a, 'b) t -> 'a -> ('a, 'b) t option @@ portable
val remove_or_null : ('a, 'b) t -> 'a -> ('a, 'b) t or_null @@ portable
val inter : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t option @@ portable
val inter_or_null : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t or_null @@ portable
val singleton : ('a, 'cmp) Core.Comparator.Module.t -> 'a -> ('a, 'cmp) t @@ portable
val reduce : ('a, _) t -> map:('a -> 'b) -> f:('b -> 'b -> 'b) -> 'b @@ portable
val fold : ('a, _) t -> init:'b -> f:('b -> 'a -> 'b) -> 'b @@ portable
val iter : ('a, _) t -> f:('a -> unit) @ local -> unit @@ portable
val of_list : ('a, 'cmp) Core.Comparator.Module.t -> 'a list -> ('a, 'cmp) t option @@ portable
val of_list_or_null : ('a, 'cmp) Core.Comparator.Module.t -> 'a list -> ('a, 'cmp) t or_null @@ portable
val of_list_exn : ('a, 'cmp) Core.Comparator.Module.t -> 'a list -> ('a, 'cmp) t @@ portable
val of_nonempty_list : ('a, 'cmp) Core.Comparator.Module.t -> 'a Core.Nonempty_list.t -> ('a, 'cmp) t @@ portable
val to_list : ('a, _) t -> 'a list @@ portable
val to_nonempty_list : ('a, _) t -> 'a Core.Nonempty_list.t @@ portable
val map : ('b, 'cmp) Core.Comparator.Module.t -> ('a, _) t -> f:('a -> 'b) -> ('b, 'cmp) t @@ portable
val of_set : ('a, 'b) Core.Set.t -> ('a, 'b) t option @@ portable
val of_set_or_null : ('a, 'b) Core.Set.t -> ('a, 'b) t or_null @@ portable
val of_set_exn : ('a, 'b) Core.Set.t -> ('a, 'b) t @@ portable
val of_set_add : ('a, 'b) Core.Set.t -> 'a -> ('a, 'b) t @@ portable
val to_set : ('a, 'b) t -> ('a, 'b) Core.Set.t @@ portable
val to_set_remove : ('a, 'b) t -> 'a -> ('a, 'b) Core.Set.t @@ portable
val to_set_inter : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) Core.Set.t @@ portable
val union : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t @@ portable

union t1 t2 returns the union of the two sets. O(length t1 + length t2).

val union_set : ('a, 'b) t -> ('a, 'b) Core.Set.t -> ('a, 'b) t @@ portable
val union_list : ('a, 'cmp) t Core.Nonempty_list.t -> ('a, 'cmp) t @@ portable

union t list returns the union of t and all the sets in list. O(max(List.length list, n log n)), where n is the sum of sizes of the input sets.

val union_set_list : ('a, 'cmp) t -> ('a, 'cmp) Core.Set.t list -> ('a, 'cmp) t @@ portable
val diff : ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) Core.Set.t @@ portable
val mem : ('a, _) t -> 'a -> bool @@ portable
val length : (_, _) t -> int @@ portable
val equal : ('a, 'b) t -> ('a, 'b) t -> bool @@ portable
val is_subset : ('a, 'b) t -> of_:('a, 'b) t -> bool @@ portable
val max_elt : ('a, _) t -> 'a @@ portable
val min_elt : ('a, _) t -> 'a @@ portable
val choose : ('a, _) t -> 'a @@ portable
val sexp_of_m__t : (module Core.Set.Sexp_of_m with type t = 'elt) -> ('elt, 'cmp) t -> Core.Sexp.t
val m__t_of_sexp : (module Core.Set.M_of_sexp with type comparator_witness = 'cmp and type t = 'elt) -> Core.Sexp.t -> ('elt, 'cmp) t
val m__t_sexp_grammar : (module Core.Set.M_sexp_grammar with type t = 'elt) -> ('elt, 'cmp) t Sexplib0.Sexp_grammar.t @@ portable
val bin_shape_m__t : ('a, 'b) Core.Set.Elt_bin_io.t -> Core.Bin_prot.Shape.t
val bin_size_m__t : ('a, 'b) Core.Set.Elt_bin_io.t -> ('a, 'b) t Core.Bin_prot.Size.sizer
val bin_write_m__t : ('a, 'b) Core.Set.Elt_bin_io.t -> ('a, 'b) t Core.Bin_prot.Write.writer
val bin_read_m__t : ('a, 'b) Core.Set.Elt_bin_io.t -> ('a, 'b) t Core.Bin_prot.Read.reader
val __bin_read_m__t__ : ('a, 'b) Core.Set.Elt_bin_io.t -> ('a, 'b) t Core.Bin_prot.Read.vtag_reader
val quickcheck_generator_m__t : (module Core.Set.Quickcheck_generator_m with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) t Core.Quickcheck.Generator.t
val quickcheck_observer_m__t : (module Core.Set.Quickcheck_observer_m with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) t Core.Quickcheck.Observer.t
val quickcheck_shrinker_m__t : (module Core.Set.Quickcheck_shrinker_m with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) t Core.Quickcheck.Shrinker.t
val hash_fold_m__t : (module Core.Set.Hash_fold_m with type t = 'elt) -> Core.Hash.state -> ('elt, _) t -> Core.Hash.state
val hash_m__t : (module Core.Set.Hash_fold_m with type t = 'elt) -> ('elt, _) t -> int
val compare_m__t : (module Core.Set.Compare_m) -> ('elt, 'cmp) t -> ('elt, 'cmp) t -> int
val equal_m__t : (module Core.Set.Equal_m) -> ('elt, 'cmp) t -> ('elt, 'cmp) t -> bool
module M (Elt : sig ... end) : sig ... end
module Stable : sig ... end