Module type Map_like.HASHTBL

Generic hashbtl interface.

type t

The type for hash tables.

type key

The type for hash table keys.

type value

The type for hash table values.

val create : int -> t

create n is an empty hash table.

val mem : t -> key -> bool

mem h k is true iff h has a binding for k.

val add : t -> key -> value -> unit

add h k v adds a binding for k to v in h.

val remove : t -> key -> unit

remove h k remove the current binding of k in h.

val find_opt : t -> key -> value option

find_opt h k is the current binding for key k in h (if any).

val fold : (key -> value -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f h init folds over the bindings of h with f starting with init.

val equal : (value -> value -> bool) -> t -> t -> bool

equal veq h0 h1 tests whether h0 and h1 contain the same keys and associate them with equal values according to veq

val compare : (key -> key -> int) -> (value -> value -> int) -> t -> t -> int

compare kcmp vcmp h0 h1 totally order h0 and h1 with kcmp used to compare keys and vcmp used to compare the value of equal keys.

val pp_applied_name : Stdlib.Format.formatter -> unit -> unit

pp_applied_name ppf () formats an applied name for the hash table type.