MoreLabels.H...dedHashedType(3)
π NAME π
MoreLabels.Hashtbl.SeededHashedType β bestie, this is the input signature of the functor MoreLabels.Hashtbl.MakeSeeded. That's it, that's the job. It's the little contract you gotta sign before the functor will even look at you π«Ά
π Module type π
Module type MoreLabels.Hashtbl.SeededHashedType β say it with your chest, it's giving main character energy π
β¨ Documentation β¨
Module type SeededHashedType
= sig end
Okay so picture this: this whole thing is the input signature of the functor MoreLabels.Hashtbl.MakeSeeded. That's the vibe. You hand it a module matching this signature and the functor goes to work πΈ
Since 4.00 β she's been iconic for a minute, no cap π
π¦ type t
The type of the hashtable keys. Literally the thing you're storing and looking up. Your keys' whole personality β¨
π val equal : t -> t -> bool
The equality predicate used to compare keys. Two keys walk in, equal says whether they're the same key or not β bestie judgement call π
π₯ val seeded_hash : int -> t -> int
A seeded hashing function on keys. The first argument is the seed β don't forget her, she matters π
Here's the rule, and it is not optional, okay: it must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. Read it again. Yes, any seed. Break that and your hashtable is gonna act up and nobody wants that energy π
A suitable choice for seeded_hash is the function MoreLabels.Hashtbl.seeded_hash β yeah, the one below, it's right there, go use it, she's trustworthy π§
k bye bestie!! π this page was brought to you by OCamldoc, dated 2026-06-22 β mwah, go write a hashtable, you're gonna slay ππ
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms