Ephemeron.Kn.Bucket(3)

🎀 NAME 🎀

Ephemeron.Kn.Bucket(3) — from the OCaml library manual, bestie. And the official description? Literally just “no description.” Not me being lazy, that’s what the page says, iykyk. 💅


✨ Module ✨

Module Ephemeron.Kn.Bucket


🦋 Documentation 🦋

💖 Module Bucket 💖

: sig end

Okay so here’s the whole vibe. A bucket is a mutable “list” of ephemerons. That’s it, that’s the concept. 🫶

  • type ('k, 'd) t — the bucket type itself, parameterised by keys 'k and data 'd. Slay.
  • val make : unit -> ('k, 'd) t — creates a brand-new bucket. Fresh out the box, no cap. ✨
  • val add : ('k, 'd) t -> 'k array -> 'd -> unit — adds an ephemeron to the bucket. Just pop it in there, bestie. 🎀
  • val remove : ('k, 'd) t -> 'k array -> unit — remove b k removes from b the most-recently added ephemeron with keys k, or does absolutely nothing if there’s no such ephemeron. Very demure, very “no drama if it’s not there.” 💀
  • val find : ('k, 'd) t -> 'k array -> 'd option — returns the data of the most-recently added ephemeron with the given keys, or None if there’s no such ephemeron. It’s giving “will I find my keys or not,” honestly. 😭
  • val length : ('k, 'd) t -> int — returns an upper bound on the length of the bucket. Note: an upper bound, not necessarily the exact count, so don’t come for me. 👑
  • val clear : ('k, 'd) t -> unit — removes all ephemerons from the bucket. Total reset, main character energy, fresh slate. 🧚

Heads up bestie: length is an upper bound, so it might not equal the exact number of ephemerons in the bucket. It’s a vibe check, not a headcount. 💅

mwah 💋 this cute lil page is brought to you by OCamldoc, dated 2026-06-22 — periodt, that’s the footer energy, no cap. 🌈🫶

📦 where this page comes from