module M:Kwmap.Make(sigtypet =string optionval compare :'a -> 'a -> intend)
include struct ... end
val keys : 'a t -> key listm : the mapval adjoin : ('a -> 'b -> 'b) -> 'b -> key -> 'a -> 'b t -> 'b tadjoin vadd empty returns a function f k v m that adjoins v to the
collection of values associated with key k. vadd might be cons and
empty, [], or S.add and S.empty for some set S.vadd : vadd v c is a function that adds v to a collection c,
returning the extended collection.empty : is the zero element for vaddk : keyv : valuem : the mapval append : 'a list t -> key -> 'a -> 'a list tadjoin.v to list of values associated with km : the mapk : keyv : valueval size : 'a t -> intm : the mapval diff : 'a t -> 'b t -> 'a ta minus map b i.e. for each key in b, remove it from aa : minuendb : subtrahendval replace : key -> 'a -> 'a t -> 'a tk and v in map mk : keyv : valuem : the mapval of_list : (key * 'a) list -> 'a t -> 'a tl : the list of pairsm : the map to add items toval values : 'a t -> 'a listm : the mapval intersect : (key -> 'a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
the value associated with each key in the new map is a
function of the (shared) key and the two old values
Returns new intersection map
f : function to apply to the key, the a-value and the b-valuea : first mapb : second mapval union : 'a t -> 'a t -> 'a ta and b, keywise, preferring values in b when keys conflicta : first mapb : second mapval incr : ?i:int -> key -> int t -> int ti to valuek valuei : the increment (default: 1)k : the keym : the mapval to_list : 'a t -> (key * 'a) listmap : the mapval comparer : ?def:'a -> ?result:int -> (key * 'a) list -> key -> key -> intPervasives.compare-compatible comparison function, using the map as a "sort map"
Parameters def and result are mutually exclusive.Pervasives.compare-compatible comparison functiondef : default value for any key not in map (default: raise Not_found)result : default result (~-1,0,1) for any key not in map (default: raise Not_found)fs : alist of keys paired with sort values