Module MutableMap.String
type key = stringtype key = string;type 'a ttype t('a);val make : unit -> 'a tlet make: unit => t('a);val clear : 'a t -> unitlet clear: t('a) => unit;val isEmpty : 'a t -> boollet isEmpty: t('a) => bool;val has : 'a t -> key -> boollet has: t('a) => key => bool;val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> intlet cmpU: t('a) => t('a) => Js.Fn.arity2(('a => 'a => int)) => int;val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> intlet cmp: t('a) => t('a) => ('a => 'a => int) => int;cmp 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 -> boollet eqU: t('a) => t('a) => Js.Fn.arity2(('a => 'a => bool)) => bool;val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> boollet eq: t('a) => t('a) => ('a => 'a => bool) => bool;eq m1 m2 cmp
val forEachU : 'a t -> (key -> 'a -> unit) Js.Fn.arity2 -> unitlet forEachU: t('a) => Js.Fn.arity2((key => 'a => unit)) => unit;val forEach : 'a t -> (key -> 'a -> unit) -> unitlet forEach: t('a) => (key => 'a => unit) => unit;forEach 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 -> 'blet reduceU: t('a) => 'b => Js.Fn.arity3(('b => key => 'a => 'b)) => 'b;val reduce : 'a t -> 'b -> ('b -> key -> 'a -> 'b) -> 'blet reduce: t('a) => 'b => ('b => key => 'a => 'b) => 'b;reduce 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 -> boollet everyU: t('a) => Js.Fn.arity2((key => 'a => bool)) => bool;val every : 'a t -> (key -> 'a -> bool) -> boollet every: t('a) => (key => 'a => bool) => bool;every 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 -> boollet someU: t('a) => Js.Fn.arity2((key => 'a => bool)) => bool;val some : 'a t -> (key -> 'a -> bool) -> boollet some: t('a) => (key => 'a => bool) => bool;some 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 -> intlet size: t('a) => int;val toList : 'a t -> (key * 'a) listlet toList: t('a) => list((key, 'a));In increasing order
val toArray : 'a t -> (key * 'a) arraylet toArray: t('a) => array((key, 'a));In increasing order
val fromArray : (key * 'a) array -> 'a tlet fromArray: array((key, 'a)) => t('a);val keysToArray : 'a t -> key arraylet keysToArray: t('a) => array(key);val valuesToArray : 'a t -> 'a arraylet valuesToArray: t('a) => array('a);val minKey : _ t -> key optionlet minKey: t(_) => option(key);val minKeyUndefined : _ t -> key Js.undefinedlet minKeyUndefined: t(_) => Js.undefined(key);val maxKey : _ t -> key optionlet maxKey: t(_) => option(key);val maxKeyUndefined : _ t -> key Js.undefinedlet maxKeyUndefined: t(_) => Js.undefined(key);val minimum : 'a t -> (key * 'a) optionlet minimum: t('a) => option((key, 'a));val minUndefined : 'a t -> (key * 'a) Js.undefinedlet minUndefined: t('a) => Js.undefined((key, 'a));val maximum : 'a t -> (key * 'a) optionlet maximum: t('a) => option((key, 'a));val maxUndefined : 'a t -> (key * 'a) Js.undefinedlet maxUndefined: t('a) => Js.undefined((key, 'a));val get : 'a t -> key -> 'a optionlet get: t('a) => key => option('a);val getUndefined : 'a t -> key -> 'a Js.undefinedlet getUndefined: t('a) => key => Js.undefined('a);val getWithDefault : 'a t -> key -> 'a -> 'alet getWithDefault: t('a) => key => 'a => 'a;val getExn : 'a t -> key -> 'alet getExn: t('a) => key => 'a;val checkInvariantInternal : _ t -> unitlet checkInvariantInternal: t(_) => unit;raise when invariant is not held
val remove : 'a t -> key -> unitlet remove: t('a) => key => unit;remove m x do the in-place modification
val removeMany : 'a t -> key array -> unitlet removeMany: t('a) => array(key) => unit;val set : 'a t -> key -> 'a -> unitlet set: t('a) => key => 'a => unit;set 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 -> unitlet updateU: t('a) => key => Js.Fn.arity1((option('a) => option('a))) => unit;val update : 'a t -> key -> ('a option -> 'a option) -> unitlet update: t('a) => key => (option('a) => option('a)) => unit;val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b tlet mapU: t('a) => Js.Fn.arity1(('a => 'b)) => t('b);val map : 'a t -> ('a -> 'b) -> 'b tlet map: t('a) => ('a => 'b) => t('b);map 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 tlet mapWithKeyU: t('a) => Js.Fn.arity2((key => 'a => 'b)) => t('b);val mapWithKey : 'a t -> (key -> 'a -> 'b) -> 'b tlet mapWithKey: t('a) => (key => 'a => 'b) => t('b);