Ephemeron.K1.Bucket(3)

πŸ’– NAME πŸ’–

Bestie, welcome to the Ephemeron.K1.Bucket(3) page β€” yes, that's the manual page name, and it lives in the OCaml library. The name section itself literally says no description, so that's not me skipping the tea; the page just came in with no description. 🫢


πŸ¦‹ Module πŸ¦‹

The module is Ephemeron.K1.Bucket. Slay, we love a clearly labeled module. πŸ’…


✨ Documentation ✨

The docs open with this exact module signature:

Module Bucket
 : sig end

Then we get the type, and it's giving mutable-list-of-ephemerons energy:

type ('k, 'd) t

A bucket is a mutable "list" of ephemerons. Periodt. πŸŽ€

  • val make : unit -> ('k, 'd) t β€” Creates a new bucket. Fresh bucket, new main-character era. ✨
  • val add : ('k, 'd) t -> 'k -> 'd -> unit β€” Adds an ephemeron to the bucket. Drop it in, bestie. 🫢
  • val remove : ('k, 'd) t -> 'k -> unit β€” remove b k removes from b the most-recently added ephemeron with key k, or does nothing if there is no such ephemeron. No cap, most-recently-added is the one that gets taken out. πŸ’…
  • val find : ('k, 'd) t -> 'k -> 'd option β€” Returns the data of the most-recently added ephemeron with the given key, or None if there is no such ephemeron. So you either get the data or a very chill None. 😭
  • val length : ('k, 'd) t -> int β€” Returns an upper bound on the length of the bucket. Not necessarily the exact length β€” it's an upper bound, okay? Don't come for me. πŸ’€
  • val clear : ('k, 'd) t -> unit β€” Removes all ephemerons from the bucket. Clean slate, iconic behavior. 🌈

Crafted by OCamldoc, dated 2026-06-22, for Ephemeron.K1.Bucket(3) β€” mwah, bye bestie! πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from