include Accessors_generic
include Set.Accessors_generic
include Base.Container.Generic_phantom
val length : (_, _) t -> intval is_empty : (_, _) t -> boolval iter : ('a, _) t -> f:('a elt -> unit) -> unitval fold : ('a, _) t -> init:'accum -> f:('accum -> 'a elt -> 'accum) -> 'accumval fold_result : ('a, _) t -> init:'accum -> f:('accum -> 'a elt -> ('accum, 'e) Base.Result.t) -> ('accum, 'e) Base.Result.tval fold_until : ('a, _) t -> init:'accum -> f:('accum -> 'a elt -> ('accum, 'final) Base__Container_intf.Export.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'finalval exists : ('a, _) t -> f:('a elt -> bool) -> boolval for_all : ('a, _) t -> f:('a elt -> bool) -> boolval count : ('a, _) t -> f:('a elt -> bool) -> intval sum : (module Base__Container_intf.Summable with type t = 'sum) -> ('a, _) t -> f:('a elt -> 'sum) -> 'sumval find : ('a, _) t -> f:('a elt -> bool) -> 'a elt optionval find_map : ('a, _) t -> f:('a elt -> 'b option) -> 'b optionval to_list : ('a, _) t -> 'a elt listval to_array : ('a, _) t -> 'a elt arrayval min_elt : ('a, _) t -> compare:('a elt -> 'a elt -> int) -> 'a elt optionval max_elt : ('a, _) t -> compare:('a elt -> 'a elt -> int) -> 'a elt option
type ('a, 'cmp) treetype ('a, 'cmp, 'z) optionsThe
optionstype is used to makeAccessors_genericflexible as to whether a comparator is required to be passed to certain functions.
val invariants : ('a, 'cmp, ('a, 'cmp) t -> bool) optionsval mem : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> bool) optionsoverride
Container'smem
val add : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t) optionsval remove : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t) optionsval union : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) optionsval inter : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) optionsval diff : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) optionsval symmetric_diff : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a elt, 'a elt) Base.Either.t Base.Sequence.t) optionsval compare_direct : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> int) optionsval equal : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> bool) optionsval is_subset : ('a, 'cmp, ('a, 'cmp) t -> of_:('a, 'cmp) t -> bool) optionsval are_disjoint : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> bool) options
module Named : sig ... endval fold_until : ('a, _) t -> init:'b -> f:('b -> 'a elt -> ('b, 'final) Base__Set_intf.Continue_or_stop.t) -> finish:('b -> 'final) -> 'finalval fold_right : ('a, _) t -> init:'b -> f:('a elt -> 'b -> 'b) -> 'bval iter2 : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> f:([ `Left of 'a elt | `Right of 'a elt | `Both of 'a elt * 'a elt ] -> unit) -> unit) optionsval filter : ('a, 'cmp, ('a, 'cmp) t -> f:('a elt -> bool) -> ('a, 'cmp) t) optionsval partition_tf : ('a, 'cmp, ('a, 'cmp) t -> f:('a elt -> bool) -> ('a, 'cmp) t * ('a, 'cmp) t) optionsval elements : ('a, _) t -> 'a elt listval min_elt : ('a, _) t -> 'a elt optionval min_elt_exn : ('a, _) t -> 'a eltval max_elt : ('a, _) t -> 'a elt optionval max_elt_exn : ('a, _) t -> 'a eltval choose : ('a, _) t -> 'a elt optionval choose_exn : ('a, _) t -> 'a eltval split : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t * 'a elt option * ('a, 'cmp) t) optionsval group_by : ('a, 'cmp, ('a, 'cmp) t -> equiv:('a elt -> 'a elt -> bool) -> ('a, 'cmp) t list) optionsval find_exn : ('a, _) t -> f:('a elt -> bool) -> 'a eltval nth : ('a, _) t -> int -> 'a elt optionval remove_index : ('a, 'cmp, ('a, 'cmp) t -> int -> ('a, 'cmp) t) optionsval to_tree : ('a, 'cmp) t -> ('a elt, 'cmp) treeval to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a elt -> ?less_or_equal_to:'a elt -> ('a, 'cmp) t -> 'a elt Base.Sequence.t) optionsval binary_search : ('a, 'cmp, ('a, 'cmp) t -> compare:('a elt -> 'key -> int) -> [ `Last_strictly_less_than | `Last_less_than_or_equal_to | `Last_equal_to | `First_equal_to | `First_greater_than_or_equal_to | `First_strictly_greater_than ] -> 'key -> 'a elt option) optionsval binary_search_segmented : ('a, 'cmp, ('a, 'cmp) t -> segment_of:('a elt -> [ `Left | `Right ]) -> [ `Last_on_left | `First_on_right ] -> 'a elt option) optionsval merge_to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a elt -> ?less_or_equal_to:'a elt -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a elt, 'a elt) Base.Sequence.Merge_with_duplicates_element.t Base.Sequence.t) options
val to_map : ('a, 'cmp, ('a, 'cmp) t -> f:('a elt -> 'b) -> ('a elt, 'b, 'cmp cmp) Base.Map.t) optionsval quickcheck_observer : 'a elt Quickcheck.Observer.t -> ('a, 'cmp) t Quickcheck.Observer.tval quickcheck_shrinker : ('a, 'cmp, 'a elt Quickcheck.Shrinker.t -> ('a, 'cmp) t Quickcheck.Shrinker.t) options
include Creators_generic with type ('a, 'b, 'c) options := ('a, 'b, 'c) options with type ('a, 'b) t := ('a, 'b) t with type ('a, 'b) tree := ('a, 'b) tree with type 'a elt := 'a elt with type 'cmp cmp := 'cmp cmp
include Set.Creators_generic with type 'cmp cmp := 'cmp cmp and type 'a elt := 'a elt and type ('a, 'b) tree := ('a, 'b) tree and type ('a, 'b) t := ('a, 'b) t and type ('a, 'b, 'c) options := ('a, 'b, 'c) options
val empty : ('a, 'b, 'c) optionsval singleton : ('a, 'b, 'c) optionsval union_list : ('a, 'b, 'c) optionsval of_list : ('a, 'b, 'c) optionsval of_array : ('a, 'b, 'c) optionsval of_sorted_array : ('a, 'b, 'c) optionsval of_sorted_array_unchecked : ('a, 'b, 'c) optionsval of_increasing_iterator_unchecked : ('a, 'b, 'c) optionsval stable_dedup_list : ('a, 'b, 'c) optionsval map : ('a, 'b, 'c) optionsThe types of
mapandfilter_mapare subtle. The input set,('a, _) set, reflects the fact that these functions take a set of *any* type, with any comparator, while the output set,('b, 'cmp) t, reflects that the output set has the particular'cmpof the creation function. The comparator can come in one of three ways, depending on which set module is usedSet.map-- comparator comes as an argumentSet.Poly.map-- comparator is polymorphic comparisonFoo.Set.map-- comparator isFoo.comparator
val of_hash_set : ('a, 'b, 'c) optionsval of_hashtbl_keys : ('a, 'b, 'c) optionsval of_map_keys : ('a elt, _, 'cmp cmp) Base.Map.t -> ('a, 'b) tNever requires a comparator because it can get one from the input
Map.t.
val quickcheck_generator : ('a, 'b, 'c) options