Module Base.Set

type (!'elt, !'cmp) t
val compare : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> int
type (!'k, !'cmp) comparator = (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'k)
  • deprecated [since 2021-12] use [Comparator.Module.t] instead
val invariants : ('a, 'b) t -> bool
val comparator_s : ('a, 'cmp) t -> (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a)
val comparator : ('a, 'cmp) t -> ('a, 'cmp) Base__.Comparator.t
val empty : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) t
val singleton : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a -> ('a, 'cmp) t
val length : ('a, 'b) t -> int
val is_empty : ('a, 'b) t -> bool
val mem : ('a, 'b) t -> 'a -> bool
val add : ('a, 'cmp) t -> 'a -> ('a, 'cmp) t
val remove : ('a, 'cmp) t -> 'a -> ('a, 'cmp) t
val union : ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
val union_list : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) t list -> ('a, 'cmp) t
val inter : ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
val diff : ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
val symmetric_diff : ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'a) Base__.Either0.t Base__.Sequence.t
val compare_direct : ('a, 'cmp) t -> ('a, 'cmp) t -> int
val equal : ('a, 'cmp) t -> ('a, 'cmp) t -> bool
val exists : ('a, 'b) t -> f:('a -> bool) -> bool
val for_all : ('a, 'b) t -> f:('a -> bool) -> bool
val count : ('a, 'b) t -> f:('a -> bool) -> int
val sum : (module Base__Container_intf.Summable with type t = 'sum) -> ('a, 'b) t -> f:('a -> 'sum) -> 'sum
val find : ('a, 'b) t -> f:('a -> bool) -> 'a option
val find_map : ('a, 'c) t -> f:('a -> 'b option) -> 'b option
val find_exn : ('a, 'b) t -> f:('a -> bool) -> 'a
val nth : ('a, 'b) t -> int -> 'a option
val remove_index : ('a, 'cmp) t -> int -> ('a, 'cmp) t
val is_subset : ('a, 'cmp) t -> of_:('a, 'cmp) t -> bool
val are_disjoint : ('a, 'cmp) t -> ('a, 'cmp) t -> bool
module Named : sig ... end
val of_list : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a list -> ('a, 'cmp) t
val of_sequence : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a Base__.Sequence.t -> ('a, 'cmp) t
val of_array : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a array -> ('a, 'cmp) t
val to_list : ('a, 'b) t -> 'a list
val to_array : ('a, 'b) t -> 'a array
val of_sorted_array : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a array -> (('a, 'cmp) t, Base__.Info.t) result
val of_sorted_array_unchecked : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> 'a array -> ('a, 'cmp) t
val of_increasing_iterator_unchecked : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> len:int -> f:(int -> 'a) -> ('a, 'cmp) t
val stable_dedup_list : (module Base__.Comparator.S with type comparator_witness = 'b and type t = 'a) -> 'a list -> 'a list
val map : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'b) -> ('a, 'c) t -> f:('a -> 'b) -> ('b, 'cmp) t
val filter_map : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'b) -> ('a, 'c) t -> f:('a -> 'b option) -> ('b, 'cmp) t
val filter : ('a, 'cmp) t -> f:('a -> bool) -> ('a, 'cmp) t
val fold : ('a, 'b) t -> init:'acc -> f:('acc -> 'a -> 'acc) -> 'acc
val fold_result : ('a, 'b) t -> init:'acc -> f:('acc -> 'a -> ('acc, 'e) result) -> ('acc, 'e) result
val fold_until : ('a, 'b) t -> init:'acc -> f:('acc -> 'a -> ('acc, 'final) Base__.Container.Continue_or_stop.t) -> finish:('acc -> 'final) -> 'final
val fold_right : ('a, 'b) t -> init:'acc -> f:('a -> 'acc -> 'acc) -> 'acc
val iter : ('a, 'b) t -> f:('a -> unit) -> unit
val iter2 : ('a, 'cmp) t -> ('a, 'cmp) t -> f:([ `Both of 'a * 'a | `Left of 'a | `Right of 'a ] -> unit) -> unit
val partition_tf : ('a, 'cmp) t -> f:('a -> bool) -> ('a, 'cmp) t * ('a, 'cmp) t
val elements : ('a, 'b) t -> 'a list
val min_elt : ('a, 'b) t -> 'a option
val min_elt_exn : ('a, 'b) t -> 'a
val max_elt : ('a, 'b) t -> 'a option
val max_elt_exn : ('a, 'b) t -> 'a
val choose : ('a, 'b) t -> 'a option
val choose_exn : ('a, 'b) t -> 'a
val split : ('a, 'cmp) t -> 'a -> ('a, 'cmp) t * 'a option * ('a, 'cmp) t
val split_le_gt : ('a, 'cmp) t -> 'a -> ('a, 'cmp) t * ('a, 'cmp) t
val split_lt_ge : ('a, 'cmp) t -> 'a -> ('a, 'cmp) t * ('a, 'cmp) t
val group_by : ('a, 'cmp) t -> equiv:('a -> 'a -> bool) -> ('a, 'cmp) t list
val to_sequence : ?order:[ `Decreasing | `Increasing ] -> ?greater_or_equal_to:'a -> ?less_or_equal_to:'a -> ('a, 'cmp) t -> 'a Base__.Sequence.t
val binary_search_segmented : ('a, 'cmp) t -> segment_of:('a -> [ `Left | `Right ]) -> [ `First_on_right | `Last_on_left ] -> 'a option
module Merge_to_sequence_element : sig ... end
val merge_to_sequence : ?order:[ `Decreasing | `Increasing ] -> ?greater_or_equal_to:'a -> ?less_or_equal_to:'a -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'a) Merge_to_sequence_element.t Base__.Sequence.t
module M (Elt : sig ... end) : sig ... end
module type Sexp_of_m = sig ... end
module type M_of_sexp = sig ... end
module type M_sexp_grammar = sig ... end
module type Compare_m = sig ... end
module type Equal_m = sig ... end
module type Hash_fold_m = sig ... end
val sexp_of_m__t : (module Sexp_of_m with type t = 'elt) -> ('elt, 'cmp) t -> Sexplib0.Sexp.t
val m__t_of_sexp : (module M_of_sexp with type comparator_witness = 'cmp and type t = 'elt) -> Sexplib0.Sexp.t -> ('elt, 'cmp) t
val m__t_sexp_grammar : (module M_sexp_grammar with type t = 'elt) -> ('elt, 'cmp) t Sexplib0.Sexp_grammar.t
val compare_m__t : (module Compare_m) -> ('elt, 'cmp) t -> ('elt, 'cmp) t -> int
val equal_m__t : (module Equal_m) -> ('elt, 'cmp) t -> ('elt, 'cmp) t -> bool
val hash_fold_m__t : (module Hash_fold_m with type t = 'elt) -> Base_internalhash_types.state -> ('elt, 'a) t -> Base_internalhash_types.state
val hash_m__t : (module Hash_fold_m with type t = 'elt) -> ('elt, 'a) t -> int
module Poly : sig ... end
module Using_comparator : sig ... end
val to_tree : ('a, 'cmp) t -> ('a, 'cmp) Using_comparator.Tree.t
val of_tree : (module Base__.Comparator.S with type comparator_witness = 'cmp and type t = 'a) -> ('a, 'cmp) Using_comparator.Tree.t -> ('a, 'cmp) t
module With_comparator : sig ... end
module With_first_class_module : sig ... end
module Without_comparator : sig ... end
module type For_deriving = sig ... end
module type S_poly = sig ... end
module type Accessors_generic = sig ... end
module type Creators_generic = sig ... end
module type Creators_and_accessors_generic = sig ... end
module type Elt_plain = sig ... end