Ephemeron.SeededS(3)

πŸ’– Ephemeron.SeededS(3) πŸ’–

ok so this is a page from the OCaml library manual, bestie, and it's a module type page β€” which means it's basically the blueprint/vibe check for a module, not the module itself. no cap. πŸŽ€


✨ NAME ✨

Ephemeron.SeededS β€” it's giving "the output signature of the functors Ephemeron.K1.MakeSeeded and Ephemeron.K2.MakeSeeded." that's literally the whole assignment πŸ’…


🌸 Module type 🌸

So the thing being documented here is:

Module type Ephemeron.SeededS

like, not a value, not a function β€” a module type. main character energy honestly πŸ‘‘


πŸ¦‹ Documentation πŸ¦‹

ok so here's the whole definition, laid out:

Module type SeededS
 = sig end

yep that's what the page says β€” it's shown as an empty sig end shell, because the docs are just listing the signature's contents below. no, I'm not making that up, that's what's printed. 🫢

And to be super clear about what it is: it's the output signature of the functors Ephemeron.K1.MakeSeeded and Ephemeron.K2.MakeSeeded. ikyk. πŸ”₯


🌈 the types 🌈

  • ```ocaml type key
the abstract key type, bestie. it's a type, it's called `key`. that's the tea. ⭐

- ```ocaml
type !'a t

the actual ephemeron table type, parameterised over 'a β€” and note the ! there, it's part of the signature exactly as written, don't come for me, I'm copying it character for character πŸ’€


🧚 the vals 🧚

here's every single one, in order, no skips (I would never πŸ™ˆ):

  • val create : ?random:bool -> int -> 'a t β€” makes you a fresh 'a t. it takes an optional ?random:bool and an int. slay. ✨
  • val clear : 'a t -> unit β€” clears it. returns unit. boom, done. πŸ’œ
  • val reset : 'a t -> unit β€” resets it. returns unit. also boom, done. πŸ’œ
  • val copy : 'a t -> 'a t β€” copies it, gives you back a 'a t. πŸŽ€
  • val add : 'a t -> key -> 'a -> unit β€” adds a binding from key to 'a. returns unit. πŸ“
  • val remove : 'a t -> key -> unit β€” removes the binding for that key. returns unit. bye bestie πŸ‘‹
  • val find : 'a t -> key -> 'a β€” finds the 'a for your key. gives you the 'a. 🌸
  • val find_opt : 'a t -> key -> 'a option β€” the more chill version, gives you a 'a option instead. πŸ¦‹
  • val find_all : 'a t -> key -> 'a list β€” gives you all of them as a 'a list. obsessed. πŸ”₯
  • val replace : 'a t -> key -> 'a -> unit β€” replaces the binding. returns unit. 🌈
  • val mem : 'a t -> key -> bool β€” is this key in here? gives you a bool. yes/no, iconic. ⭐
  • val length : 'a t -> int β€” how many, as an int. πŸ‘‘
  • val stats : 'a t -> Hashtbl.statistics β€” hands you Hashtbl.statistics, which is the type from Hashtbl, not invented by me, ok 😭
  • val add_seq : 'a t -> (key * 'a) Seq.t -> unit β€” adds a whole (key * 'a) Seq.t of bindings. returns unit. πŸ’…
  • val replace_seq : 'a t -> (key * 'a) Seq.t -> unit β€” replaces with a whole (key * 'a) Seq.t. returns unit. πŸ’…
  • val of_seq : (key * 'a) Seq.t -> 'a t β€” builds you an 'a t out of a (key * 'a) Seq.t. cute. 🧚

πŸ’€ the two with actual notes πŸ’€

  • val clean : 'a t -> unit
remove all dead bindings. Done automatically during automatic resizing.

so like β€” you can call it yourself, but the table also does it on its own when it resizes. it's giving "I'll handle it, but you can help if you want." periodt. 🫢

  • val stats_alive : 'a t -> Hashtbl.statistics
same as Hashtbl.SeededS.stats but only count the alive bindings

so it's the stats situation, but only for the alive ones. ghost bindings don't get counted, we don't associate with them πŸ’€βœ¨


πŸŽ€ SEE ALSO πŸŽ€

ngl there's no SEE ALSO section on this page, bestie β€” the only other things it name-drops are the ones above: Ephemeron.K1.MakeSeeded, Ephemeron.K2.MakeSeeded, Hashtbl.statistics, and Hashtbl.SeededS.stats. go read those next, iykyk 🌸


ok bye ily, go build something iconic with your ephemerons πŸ’–

this page was brought to you by OCamldoc, dated 2026-06-22 β€” that's the source/version and date, right there in the sign-off, no cap πŸŽ€βœ¨

πŸ“¦ where this page comes from