Package index
batteries
Library batteries.unthreaded
BatHashtbl
. Labels
Module
Module BatHashtbl.Labels Operations on Hashtbl with labels.
This module overrides a number of functions of Hashtbl by functions in which some arguments require labels. These labels are there to improve readability and safety and to let you change the order of arguments to functions. In every case, the behavior of the function is identical to that of the corresponding function of Hashtbl .
@documents Hashtbl.Labels
val add : ('a , 'b ) t -> key :'a -> data :'b -> unitval replace : ('a , 'b ) t -> key :'a -> data :'b -> unitval iter : f :(key :'a -> data :'b -> unit) -> ('a , 'b ) t -> unitval for_all : f :(key :'a -> data :'b -> bool) -> ('a , 'b ) t -> boolval map : f :(key :'a -> data :'b -> 'c ) -> ('a , 'b ) t -> ('a , 'c ) t val map_inplace : f :(key :'a -> data :'b -> 'b ) -> ('a , 'b ) t -> unitval filter : f :('a -> bool) -> ('key , 'a ) t -> ('key , 'a ) t val filter_inplace : f :('a -> bool) -> ('key , 'a ) t -> unitval filteri : f :(key :'key -> data :'a -> bool) -> ('key , 'a ) t -> ('key , 'a ) t val filteri_inplace : f :(key :'key -> data :'a -> bool) -> ('key , 'a ) t -> unitval filter_map :
f :(key :'key -> data :'a -> 'b option ) ->
('key , 'a ) t ->
('key , 'b ) t val filter_map_inplace :
f :(key :'key -> data :'a -> 'a option ) ->
('key , 'a ) t ->
unitval fold : f :(key :'a -> data :'b -> 'c -> 'c ) -> ('a , 'b ) t -> init :'c -> 'c val exists : f :(key :'a -> data :'b -> bool) -> ('a , 'b ) t -> boolval modify : key :'a -> f :('b -> 'b ) -> ('a , 'b ) t -> unitval modify_def : default :'b -> key :'a -> f :('b -> 'b ) -> ('a , 'b ) t -> unitval modify_opt : key :'a -> f :('b option -> 'b option ) -> ('a , 'b ) t -> unitval merge :
f :('a -> 'b option -> 'c option -> 'd option ) ->
left :('a , 'b ) t ->
right :('a , 'c ) t ->
('a , 'd ) t val merge_all :
f :('a -> 'b list -> 'c list -> 'd list ) ->
left :('a , 'b ) t ->
right :('a , 'c ) t ->
('a , 'd ) t