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:booland anint. slay. β¨val clear : 'a t -> unitβ clears it. returnsunit. boom, done. πval reset : 'a t -> unitβ resets it. returnsunit. 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 fromkeyto'a. returnsunit. πval remove : 'a t -> key -> unitβ removes the binding for thatkey. returnsunit. bye bestie πval find : 'a t -> key -> 'aβ finds the'afor yourkey. gives you the'a. πΈval find_opt : 'a t -> key -> 'a optionβ the more chill version, gives you a'a optioninstead. π¦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. returnsunit. πval mem : 'a t -> key -> boolβ is this key in here? gives you abool. yes/no, iconic. βval length : 'a t -> intβ how many, as anint. πval stats : 'a t -> Hashtbl.statisticsβ hands youHashtbl.statistics, which is the type fromHashtbl, not invented by me, ok πval add_seq : 'a t -> (key * 'a) Seq.t -> unitβ adds a whole(key * 'a) Seq.tof bindings. returnsunit. πval replace_seq : 'a t -> (key * 'a) Seq.t -> unitβ replaces with a whole(key * 'a) Seq.t. returnsunit. πval of_seq : (key * 'a) Seq.t -> 'a tβ builds you an'a tout 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
- 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