module Elt : sig ... end with type t = Core_kernel__Md5.t and type comparator_witness = Core_kernel__Md5.comparator_witness
module Tree : sig ... end
include Core_kernel.Set_intf.S_plain with module Elt := Elt and module Tree := Tree
module Elt : sig ... end
module Tree : Core_kernel.Set_intf.Make_S_plain_tree(Elt).S
include sig ... end
val compare : t ‑> t ‑> Core_kernel__.Import.int
val sexp_of_t : t ‑> Sexplib.Sexp.t
include Core_kernel.Set_intf.Creators_and_accessors0 with type (a, b) set := (a, b) Base.Set.t with type t := t with type tree := Tree.t with type elt := Elt.t with type comparator_witness := Elt.comparator_witness
include Core_kernel.Set_intf.Accessors0
include Core_kernel.Set_intf.Set_intf.Accessors0
include Base.Container.S0
val length : t ‑> int
val is_empty : t ‑> bool
iter
must allow exceptions raised in f
to escape, terminating the iteration
cleanly. The same holds for all functions below taking an f
.
val fold_result : t ‑> init:'accum ‑> f:('accum ‑> elt ‑> ('accum, 'e) Base.Result.t) ‑> ('accum, 'e) Base.Result.t
fold_result t ~init ~f
is a short-circuiting version of fold
that runs in the
Result
monad. If f
returns an Error _
, that value is returned without any
additional invocations of f
.
val fold_until : t ‑> init:'accum ‑> f:('accum ‑> elt ‑> ('accum, 'stop) Base.Container_intf.Continue_or_stop.t) ‑> ('accum, 'stop) Base.Container_intf.Finished_or_stopped_early.t
fold_until t ~init ~f
is a short-circuiting version of fold
. If f
returns Stop _
the computation ceases and results in that value. If f
returns
Continue _
, the fold will proceed.
Returns true
if and only if there exists an element for which the provided
function evaluates to true
. This is a short-circuiting operation.
Returns true
if and only if the provided function evaluates to true
for all
elements. This is a short-circuiting operation.
val sum : (module Base.Commutative_group.S with type t = 'sum) ‑> t ‑> f:(elt ‑> 'sum) ‑> 'sum
Returns the sum of f i
for all i
in the container.
val invariants : t ‑> bool
val symmetric_diff : t ‑> t ‑> (elt, elt) Base.Either.t Base.Sequence.t
val fold_until : t ‑> init:'b ‑> f:('b ‑> elt ‑> ('b, 'stop) Core_kernel.Set_intf.Set_intf.Continue_or_stop.t) ‑> ('b, 'stop) Core_kernel.Set_intf.Set_intf.Finished_or_stopped_early.t
val to_sequence : ?order:[ `Increasing | `Decreasing ] ‑> ?greater_or_equal_to:elt ‑> ?less_or_equal_to:elt ‑> t ‑> elt Base.Sequence.t
val merge_to_sequence : ?order:[ `Increasing | `Decreasing ] ‑> ?greater_or_equal_to:elt ‑> ?less_or_equal_to:elt ‑> t ‑> t ‑> (elt, elt) Core_kernel.Set_intf.Set_intf.Merge_to_sequence_element.t Base.Sequence.t
val to_map : t ‑> f:(elt ‑> 'data) ‑> (elt, 'data, comparator_witness) Core_kernel.Map.t
val shrinker : elt Core_kernel.Quickcheck.Shrinker.t ‑> t Core_kernel.Quickcheck.Shrinker.t
include Core_kernel.Set_intf.Creators0 with type t := t with type tree := tree with type elt := elt with type comparator_witness := comparator_witness
include Core_kernel.Set_intf.Set_intf.Creators0
val empty : t
val of_sorted_array : elt array ‑> t Base.Or_error.t
val of_hash_set : elt Core_kernel.Hash_set.t ‑> t
val of_hashtbl_keys : (elt, _) Core_kernel.Hashtbl.t ‑> t
val of_map_keys : (elt, _, comparator_witness) Core_kernel.Map.t ‑> t
module Provide_bin_io : functor (Elt : sig ... end with type t := Elt.t) -> Core_kernel.Set_intf.Binable.S with type t := t
module Provide_hash : functor (Elt : Core_kernel__.Import.Hasher.S with type t := Elt.t) -> sig ... end with type t := t
include Core_kernel.Sexpable.S with type t := t
val t_of_sexp : Base.Sexp.t ‑> t
val sexp_of_t : t ‑> Base.Sexp.t