Hashtbl.MakeSeeded(3)

πŸ’… NAME πŸ’…

Okay so Hashtbl.MakeSeeded(3) is from the OCaml library, and it's a functor building an implementation of the hashtable structure. Bestie, it's giving reusable hash-table factory with seeded hashing, iykyk. πŸ’–


πŸ¦‹ Module πŸ¦‹

Here's the exact module shape, no cap:

Module MakeSeeded : (H : SeededHashedType) -> sig end

✨ Documentation ✨

🌸 Module MakeSeeded 🌸

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded 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 seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

Since 4.00 🫢

πŸŽ€ Parameters πŸŽ€

  • H β€” Hashtbl.SeededHashedType. That's the vibe check for your seeded hashing + equality setup. πŸ’…

⭐ The types it hands you ⭐

type key
type !'a t

πŸ‘‘ The values, all exact, no edits πŸ‘‘

  • val create : ?random:bool -> int -> 'a t
  • val clear : 'a t -> unit
  • val reset : 'a t -> unit
  • val copy : 'a t -> 'a t
  • val add : 'a t -> key -> 'a -> unit
  • val remove : 'a t -> key -> unit
  • val find_and_remove : 'a t -> key -> 'a option β€” Since 5.5 ✨
  • val find : 'a t -> key -> 'a
  • val find_opt : 'a t -> key -> 'a option β€” Since 4.05 🌸
  • val find_all : 'a t -> key -> 'a list
  • val replace : 'a t -> key -> 'a -> unit
  • val find_and_replace : 'a t -> key -> 'a -> 'a option β€” Since 5.5 πŸ”₯
  • val mem : 'a t -> key -> bool
  • val iter : (key -> 'a -> unit) -> 'a t -> unit
  • val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit β€” Since 4.03 πŸ¦‹
  • val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
  • val length : 'a t -> int
  • val stats : 'a t -> Hashtbl.statistics
  • val to_seq : 'a t -> (key * 'a) Seq.t β€” Since 4.07 🌈
  • val to_seq_keys : 'a t -> key Seq.t β€” Since 4.07 🌈
  • val to_seq_values : 'a t -> 'a Seq.t β€” Since 4.07 🌈
  • val add_seq : 'a t -> (key * 'a) Seq.t -> unit β€” Since 4.07 🌈
  • val replace_seq : 'a t -> (key * 'a) Seq.t -> unit β€” Since 4.07 🌈
  • val of_seq : (key * 'a) Seq.t -> 'a t β€” Since 4.07 🌈

Okay bye bestie πŸ’–βœ¨ This iconic little page came from OCamldoc on 2026-06-22, and the manual handle is Hashtbl.MakeSeeded(3) πŸŽ€πŸ’…

πŸ“¦ where this page comes from