Module Set.PolySource
A polymorphic Set.
include Base.Container.Generic
with type ('a, 'cmp, _) t := 'a Base.Set.Poly.t
with type 'a elt := 'a
Source
val fold_result :
'a Base.Set.Poly.t ->
init:'acc ->
f:('acc -> 'a -> ('acc, 'e) Base.Result.t) ->
('acc, 'e) Base.Result.tSource
val sum :
(module Container.Summable with type t = 'sum) ->
'a Base.Set.Poly.t ->
f:('a -> 'sum) ->
'sumoverride Container's mem
Source
val symmetric_diff :
'a Base.Set.Poly.t ->
'a Base.Set.Poly.t ->
('a, 'a) Base.Either.t Base.Sequence.tSource
val fold_until :
'a Base.Set.Poly.t ->
init:'acc ->
f:('acc -> 'a -> ('acc, 'final) Container.Continue_or_stop.t) ->
finish:('acc -> 'final) ->
'finalSource
val iter2 :
'a Base.Set.Poly.t ->
'a Base.Set.Poly.t ->
f:([ `Left of 'a | `Right of 'a | `Both of 'a * 'a ] -> unit) ->
unitSource
val partition_tf :
'a Base.Set.Poly.t ->
f:('a -> bool) ->
'a Base.Set.Poly.t * 'a Base.Set.Poly.tSource
val to_tree :
'a Base.Set.Poly.t ->
('a, Base.Comparator.Poly.comparator_witness)
Base.Set.Using_comparator.Tree.tSource
val to_sequence :
?order:[ `Increasing | `Decreasing ] ->
?greater_or_equal_to:'a ->
?less_or_equal_to:'a ->
'a Base.Set.Poly.t ->
'a Base.Sequence.tSource
val binary_search :
'a Base.Set.Poly.t ->
compare:('a -> 'key -> int) ->
Base.Binary_searchable.Which_target_by_key.t ->
'key ->
'a optionSource
val binary_search_segmented :
'a Base.Set.Poly.t ->
segment_of:('a -> [ `Left | `Right ]) ->
Base.Binary_searchable.Which_target_by_segment.t ->
'a optionSource
val merge_to_sequence :
?order:[ `Increasing | `Decreasing ] ->
?greater_or_equal_to:'a ->
?less_or_equal_to:'a ->
'a Base.Set.Poly.t ->
'a Base.Set.Poly.t ->
('a, 'a) Base.Sequence.Merge_with_duplicates_element.t Base.Sequence.tThe types of map and filter_map are 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 'cmp of the creation function. The comparator can come in one of three ways, depending on which set module is used
Set.map-- comparator comes as an argumentSet.Poly.map-- comparator is polymorphic comparisonFoo.Set.map-- comparator isFoo.comparator
Source
val of_tree :
('a, Base.Comparator.Poly.comparator_witness)
Base.Set.Using_comparator.Tree.t ->
'a Base.Set.Poly.t