Ephemeron.K2.Bucket(3)
okay so this is Ephemeron.K2.Bucket(3) from the OCaml library manual β buckle up, bestie π
π NAME π
Ephemeron.K2.Bucket β no description. That's literally what it says, bestie. No cap, the NAME section is just the name and the words "no description". Minimalist queen behavior π.
π¦ Module π¦
Module Ephemeron.K2.Bucket β this is the module, and it's the main character of this page. π«Ά
β¨ Documentation β¨
Okay so the module signature is just:
Module Bucket : sig end
Short. Sweet. Iconic. π
Now the type and all the functions β every single one, because we don't skip, periodt.
type ('k1, 'k2, 'd) tβ a bucket is a mutable "list" of ephemerons. Yes, the quotes around "list" are doing a lot of work, and we respect that πΈ.val make : unit -> ('k1, 'k2, 'd) tβ creates a brand-new bucket for you to fill with ephemerons β¨.val add : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd -> unitβ drops an ephemeron into the bucket: keyk1, keyk2, and datad, all cozy together π«Ά.val remove : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> unitβremove b k1 k2yanks the most-recently added ephemeron with keysk1andk2out ofb. And if there's no such ephemeron? It does nothing. No drama, no error, just vibes π.val find : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd optionβ returns the data of the most-recently added ephemeron with the given keys, orNoneif there is no such ephemeron. Basically a little lookup moment π₯.val length : ('k1, 'k2, 'd) t -> intβ returns an upper bound on the length of the bucket β a ceiling situation, bestie π.val clear : ('k1, 'k2, 'd) t -> unitβ removes all ephemerons from the bucket. Everything gone. Empty. Clean slate. periodt π§Ή.
Brought to you by OCamldoc, dated 2026-06-22, for Ephemeron.K2.Bucket(3) β go off, documentation πβ¨.
π¦ 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