Module MutableMap.String
type key = stringtype 'a tval make : unit -> 'a tval clear : 'a t -> unitval isEmpty : 'a t -> boolval has : 'a t -> key -> boolval cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> intval cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> intcmp m1 m2 cmp First compare by size, if size is the same, compare by key, value pair
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) Js.Fn.arity2 -> boolval eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> booleq m1 m2 cmp
val forEachU : 'a t -> (key -> 'a -> unit) Js.Fn.arity2 -> unitval forEach : 'a t -> (key -> 'a -> unit) -> unitforEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The application order of f is in increasing order.
val reduceU : 'a t -> 'b -> ('b -> key -> 'a -> 'b) Js.Fn.arity3 -> 'bval reduce : 'a t -> 'b -> ('b -> key -> 'a -> 'b) -> 'breduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.
val everyU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> boolval every : 'a t -> (key -> 'a -> bool) -> boolevery m p checks if all the bindings of the map satisfy the predicate p. The application order of p is unspecified.
val someU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> boolval some : 'a t -> (key -> 'a -> bool) -> boolsome m p checks if at least one binding of the map satisfy the predicate p. The application order of p is unspecified.
val size : 'a t -> intval toList : 'a t -> (key * 'a) listIn increasing order
val toArray : 'a t -> (key * 'a) arrayIn increasing order
val fromArray : (key * 'a) array -> 'a tval keysToArray : 'a t -> key arrayval valuesToArray : 'a t -> 'a arrayval minKey : _ t -> key optionval minKeyUndefined : _ t -> key Js.undefinedval maxKey : _ t -> key optionval maxKeyUndefined : _ t -> key Js.undefinedval minimum : 'a t -> (key * 'a) optionval minUndefined : 'a t -> (key * 'a) Js.undefinedval maximum : 'a t -> (key * 'a) optionval maxUndefined : 'a t -> (key * 'a) Js.undefinedval get : 'a t -> key -> 'a optionval getUndefined : 'a t -> key -> 'a Js.undefinedval getWithDefault : 'a t -> key -> 'a -> 'aval getExn : 'a t -> key -> 'aval checkInvariantInternal : _ t -> unitraise when invariant is not held
val remove : 'a t -> key -> unitremove m x do the in-place modification
val removeMany : 'a t -> key array -> unitval set : 'a t -> key -> 'a -> unitset m x y do the in-place modification, return m for chaining. If x was already bound in m, its previous binding disappears.
val updateU : 'a t -> key -> ('a option -> 'a option) Js.Fn.arity1 -> unitval update : 'a t -> key -> ('a option -> 'a option) -> unitval mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b tval map : 'a t -> ('a -> 'b) -> 'b tmap m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.
val mapWithKeyU : 'a t -> (key -> 'a -> 'b) Js.Fn.arity2 -> 'b tval mapWithKey : 'a t -> (key -> 'a -> 'b) -> 'b t