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: key k1, key k2, and data d, all cozy together 🫢.
  • val remove : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> unit β€” remove b k1 k2 yanks the most-recently added ephemeron with keys k1 and k2 out of b. 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, or None if 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