Module type Prime_map.S
include Stdlib.Map.S
val empty : 'a tval is_empty : 'a t -> boolval mem : key -> 'a t -> boolval add : key -> 'a -> 'a t -> 'a tval update : key -> ('a option -> 'a option) -> 'a t -> 'a tval singleton : key -> 'a -> 'a tval remove : key -> 'a t -> 'a tval merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c tval union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a tval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> intval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> boolval iter : (key -> 'a -> unit) -> 'a t -> unitval fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'bval for_all : (key -> 'a -> bool) -> 'a t -> boolval exists : (key -> 'a -> bool) -> 'a t -> boolval filter : (key -> 'a -> bool) -> 'a t -> 'a tval partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a tval cardinal : 'a t -> intval bindings : 'a t -> (key * 'a) listval min_binding : 'a t -> key * 'aval min_binding_opt : 'a t -> (key * 'a) optionval max_binding : 'a t -> key * 'aval max_binding_opt : 'a t -> (key * 'a) optionval choose : 'a t -> key * 'aval choose_opt : 'a t -> (key * 'a) optionval split : key -> 'a t -> 'a t * 'a option * 'a tval find : key -> 'a t -> 'aval find_opt : key -> 'a t -> 'a optionval find_first : (key -> bool) -> 'a t -> key * 'aval find_first_opt : (key -> bool) -> 'a t -> (key * 'a) optionval find_last : (key -> bool) -> 'a t -> key * 'aval find_last_opt : (key -> bool) -> 'a t -> (key * 'a) optionval map : ('a -> 'b) -> 'a t -> 'b tval mapi : (key -> 'a -> 'b) -> 'a t -> 'b tval to_seq : 'a t -> (key * 'a) Stdlib.Seq.tval to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.tval add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a tval of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val pop : key -> 'a t -> ('a * 'a t) optionpop k mreturnsSome (find k m, remove k m)ifkis bound inm, otherwiseNone.
val search : (key -> 'a -> 'b option) -> 'a t -> 'b optionsearch f mreturns the first non-Noneresult off k vwherek, vruns over the bindings ofmif it exists, otherwiseNone.
val fold2t : (key -> 'a -> 'b -> 'c -> 'c) -> 'a t -> 'b t -> 'c -> 'cfold2t f m0 m1returns the compositionf kₙ vₙ wₙ ∘ ⋯ ∘ f k₁ v₁ w₁wherek₁, …, kₙare the coinciding indices ofm0andm1, andv₁, …, vₙandw₁, …, wₙare the correspoding values fromm0andm1, respectively.
val map2t : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c tmap2t f m0 m1returns a map which contains a mapping fromktof x0 x1for eachk,x0, andx1such thatm0mapsktox0andm1mapsktox1.
val mapi2t : (key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'c tmapi2t f m0 m1returns a map which contains a mapping fromktof k x0 x1for eachk,x0, andx1such thatm0mapsktox0andm1mapsktox1.
val left_union : 'a t -> 'a t -> 'a tleft_union m0 m1is the map whose domain is the union of the domains ofm0andm1and whose values agree withm0where present andm1elsewhere.
val split_union : (key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'a t * 'b t * 'c tsplit_union mA mBis a triple(mA', mB', mC')wheremA'andmB'are the respective bindings ofmAandmBwhich have disjoint keys, andmC'has a binding(k, f k a b)for each pair of bindings(k, a)ofmAand(k, b)ofmBsharingk.