package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

dune-project
 Dependency

Authors

Maintainers

Sources

batteries-3.10.0.tar.gz
md5=b7f3b99f12f21b1da6b6aa13d993206d
sha512=8b7f2479eb0271bcfd9168887c1e4a9a815c512eab3ee61b150fc4dfa9ec803e4f73115155f20b3017e4a822148d0e6d1c1e8e5f96790fd691b419dd39a908a2

doc/batteries.unthreaded/BatHashtbl/Labels/index.html

Module BatHashtbl.LabelsSource

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

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