Module Hashtbl.Make
Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a tt('a) of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.
Parameters
ocaml
module H : HashedTypereasonml
module H: HashedTypeSignature
ocaml
type key = H.treasonml
type key = H.t;ocaml
type 'a t = 'a Hashtbl.Make(H).treasonml
type t('a) = Hashtbl.Make(H).t('a);ocaml
val create : int -> 'a treasonml
let create: int => t('a);ocaml
val clear : 'a t -> unitreasonml
let clear: t('a) => unit;ocaml
val reset : 'a t -> unitreasonml
let reset: t('a) => unit;since 4.00
ocaml
val copy : 'a t -> 'a treasonml
let copy: t('a) => t('a);ocaml
val add : 'a t -> key:key -> data:'a -> unitreasonml
let add: t('a) => key:key => data:'a => unit;ocaml
val remove : 'a t -> key -> unitreasonml
let remove: t('a) => key => unit;ocaml
val find : 'a t -> key -> 'areasonml
let find: t('a) => key => 'a;ocaml
val find_opt : 'a t -> key -> 'a optionreasonml
let find_opt: t('a) => key => option('a);since 4.05
ocaml
val find_all : 'a t -> key -> 'a listreasonml
let find_all: t('a) => key => list('a);ocaml
val replace : 'a t -> key:key -> data:'a -> unitreasonml
let replace: t('a) => key:key => data:'a => unit;ocaml
val mem : 'a t -> key -> boolreasonml
let mem: t('a) => key => bool;ocaml
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unitreasonml
let iter: f:(key:key => data:'a => unit) => t('a) => unit;ocaml
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unitreasonml
let filter_map_inplace: f:(key:key => data:'a => option('a)) => t('a) => unit;since 4.03
ocaml
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'accreasonml
let fold: f:(key:key => data:'a => 'acc => 'acc) => t('a) => init:'acc => 'acc;ocaml
val length : 'a t -> intreasonml
let length: t('a) => int;ocaml
val stats : 'a t -> statisticsreasonml
let stats: t('a) => statistics;since 4.00
ocaml
val to_seq : 'a t -> (key * 'a) Seq.treasonml
let to_seq: t('a) => Seq.t((key, 'a));since 4.07
ocaml
val to_seq_keys : _ t -> key Seq.treasonml
let to_seq_keys: t(_) => Seq.t(key);since 4.07
ocaml
val to_seq_values : 'a t -> 'a Seq.treasonml
let to_seq_values: t('a) => Seq.t('a);since 4.07
ocaml
val add_seq : 'a t -> (key * 'a) Seq.t -> unitreasonml
let add_seq: t('a) => Seq.t((key, 'a)) => unit;since 4.07
ocaml
val replace_seq : 'a t -> (key * 'a) Seq.t -> unitreasonml
let replace_seq: t('a) => Seq.t((key, 'a)) => unit;since 4.07
ocaml
val of_seq : (key * 'a) Seq.t -> 'a treasonml
let of_seq: Seq.t((key, 'a)) => t('a);since 4.07