Module Make.Map
include Flambda2_algorithms.Container_types.Map_plus_iterator
with type key = int
and type 'a t = 'a Flambda2_algorithms.Patricia_tree.map
with module Set = Set
include Flambda2_algorithms.Container_types_intf.Map
with type key = int
with type 'a t = 'a Flambda2_algorithms.Patricia_tree.map
with module Set = Set
module Set = Settype 'a t = 'a Flambda2_algorithms.Patricia_tree.mapval empty : 'a Map.tval is_empty : 'a Map.t -> boolunion_sharing f m1 m2 is a version of union f m1 m2 that maximizes sharing of the result with m1.
union_shared f m1 m2 is a version of union_sharing f m1 m2 that also exploits sharing of m1 and m2 to avoid calling f when possible, assuming that f x x = Some x for all xs.
val cardinal : 'a Map.t -> intval to_seq : 'a Map.t -> (Map.key * 'a) Stdlib.Seq.tval print_debug :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a Map.t ->
unitval disjoint_union :
?eq:('a -> 'a -> bool) ->
?print:(Stdlib.Format.formatter -> 'a -> unit) ->
'a Map.t ->
'a Map.t ->
'a Map.tval data : 'a Map.t -> 'a listval print :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a Map.t ->
unitdiff f m1 m2 computes a map whose keys are a subset of the keys of m1. When a binding is defined in both m1 and m2, the function f is used to combine them. Bindings that are only present in m1 are preserved. This is a special case of merge: diff f m1 m2 is equivalent to merge f' m1 m2, where
f' _key None _ = Nonef' _key (Some v) None = Some vf' key (Some v1) (Some v2) = f key v1 v2
diff_sharing f m1 m2 is a version of diff f m1 m2 that maximizes sharing of the result with m1.
diff_shared f m1 m2 is a version of diff_sharing f m1 m2 that further exploits sharing of m1 and m2 to avoid calling f when possible, assuming that f x x always returns None.
val iterator : 'a Map.t -> 'a Map.iteratoriterator t returns an iterator for all the bindings in t, initially positioned on min_binding t.
val current : 'a Map.iterator -> (Map.key * 'a) optioncurrent iterator returns the key-value pair at the current position, or None if the iterator is exhausted.
val advance : 'a Map.iterator -> 'a Map.iteratoradvance iterator position the iterator on the next key.
val seek : 'a Map.iterator -> Map.key -> 'a Map.iteratorseek iterator key positions the iterator on the next key higher or equal to the provided key.
Note: does nothing if key is less than or equal to the current key.
val valid : _ Map.t -> boolFor testing; should always return true