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