Hashtbl.Make(3) OCaml library Hashtbl.Make(3)

# [NAME](#NAME)

Hashtbl.Make - Functor building an implementation of the hashtable structure.

# [Module](#Module)

Module Hashtbl.Make

# [Documentation](#Documentation)

Module **Make**  
: **(H : HashedType) -&gt; sig end**

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 t** 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:**

"H"

**Hashtbl.HashedType**

*type key*

*type* **!'a** *t*

*val create* : **int -&gt; 'a t**

*val clear* : **'a t -&gt; unit**

*val reset* : **'a t -&gt; unit**

**Since** 4.00

*val copy* : **'a t -&gt; 'a t**

*val add* : **'a t -&gt; key -&gt; 'a -&gt; unit**

*val remove* : **'a t -&gt; key -&gt; unit**

*val find\_and\_remove* : **'a t -&gt; key -&gt; 'a option**

**Since** 5.5

*val find* : **'a t -&gt; key -&gt; 'a**

*val find\_opt* : **'a t -&gt; key -&gt; 'a option**

**Since** 4.05

*val find\_all* : **'a t -&gt; key -&gt; 'a list**

*val replace* : **'a t -&gt; key -&gt; 'a -&gt; unit**

*val find\_and\_replace* : **'a t -&gt; key -&gt; 'a -&gt; 'a option**

**Since** 5.5

*val mem* : **'a t -&gt; key -&gt; bool**

*val iter* : **(key -&gt; 'a -&gt; unit) -&gt; 'a t -&gt; unit**

*val filter\_map\_inplace* : **(key -&gt; 'a -&gt; 'a option) -&gt; 'a t -&gt; unit**

**Since** 4.03

*val fold* : **(key -&gt; 'a -&gt; 'acc -&gt; 'acc) -&gt; 'a t -&gt; 'acc -&gt; 'acc**

*val length* : **'a t -&gt; int**

*val stats* : **'a t -&gt; Hashtbl.statistics**

**Since** 4.00

*val to\_seq* : **'a t -&gt; (key * 'a) Seq.t**

**Since** 4.07

*val to\_seq\_keys* : **'a t -&gt; key Seq.t**

**Since** 4.07

*val to\_seq\_values* : **'a t -&gt; 'a Seq.t**

**Since** 4.07

*val add\_seq* : **'a t -&gt; (key * 'a) Seq.t -&gt; unit**

**Since** 4.07

*val replace\_seq* : **'a t -&gt; (key * 'a) Seq.t -&gt; unit**

**Since** 4.07

*val of\_seq* : **(key * 'a) Seq.t -&gt; 'a t**

**Since** 4.07

2026-10-23 OCamldoc

---

Document: Hashtbl.Make(3o) from ocaml 5.5.2-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
