Module BatHashtbl.Labels

module Labels: sig .. end

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.


val add : ('a, 'b) BatHashtbl.t -> key:'a -> data:'b -> unit
val replace : ('a, 'b) BatHashtbl.t -> key:'a -> data:'b -> unit
val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) BatHashtbl.t -> unit
val for_all : f:(key:'a -> data:'b -> bool) -> ('a, 'b) BatHashtbl.t -> bool
val map : f:(key:'a -> data:'b -> 'c) -> ('a, 'b) BatHashtbl.t -> ('a, 'c) BatHashtbl.t
val map_inplace : f:(key:'a -> data:'b -> 'b) -> ('a, 'b) BatHashtbl.t -> unit
val filter : f:('a -> bool) -> ('key, 'a) BatHashtbl.t -> ('key, 'a) BatHashtbl.t
val filter_inplace : f:('a -> bool) -> ('key, 'a) BatHashtbl.t -> unit
val filteri : f:(key:'key -> data:'a -> bool) ->
('key, 'a) BatHashtbl.t -> ('key, 'a) BatHashtbl.t
val filteri_inplace : f:(key:'key -> data:'a -> bool) -> ('key, 'a) BatHashtbl.t -> unit
val filter_map : f:(key:'key -> data:'a -> 'b option) ->
('key, 'a) BatHashtbl.t -> ('key, 'b) BatHashtbl.t
val filter_map_inplace : f:(key:'key -> data:'a -> 'a option) -> ('key, 'a) BatHashtbl.t -> unit
val fold : f:(key:'a -> data:'b -> 'c -> 'c) -> ('a, 'b) BatHashtbl.t -> init:'c -> 'c
val exists : f:(key:'a -> data:'b -> bool) -> ('a, 'b) BatHashtbl.t -> bool
val modify : key:'a -> f:('b -> 'b) -> ('a, 'b) BatHashtbl.t -> unit
val modify_def : default:'b -> key:'a -> f:('b -> 'b) -> ('a, 'b) BatHashtbl.t -> unit
val modify_opt : key:'a -> f:('b option -> 'b option) -> ('a, 'b) BatHashtbl.t -> unit
val merge : f:('a -> 'b option -> 'c option -> 'd option) ->
left:('a, 'b) BatHashtbl.t ->
right:('a, 'c) BatHashtbl.t -> ('a, 'd) BatHashtbl.t
val merge_all : f:('a -> 'b list -> 'c list -> 'd list) ->
left:('a, 'b) BatHashtbl.t ->
right:('a, 'c) BatHashtbl.t -> ('a, 'd) BatHashtbl.t