package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 4.14.4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml_4.14.4.tar.gz
sha256=71415c000ebfce604defafaa584ab5ed10ad81ff180897db4e6fea8dac6e4b0d

doc/stdlib/Stdlib/Ephemeron/Kn/Bucket/index.html

Module Kn.BucketSource

Sourcetype ('k, 'd) t

A bucket is a mutable "list" of ephemerons.

Sourceval make : unit -> ('k, 'd) t

Create a new bucket.

Sourceval add : ('k, 'd) t -> 'k array -> 'd -> unit

Add an ephemeron to the bucket.

Sourceval remove : ('k, 'd) t -> 'k array -> unit

remove b k removes from b the most-recently added ephemeron with keys k, or does nothing if there is no such ephemeron.

Sourceval 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 is no such ephemeron.

Sourceval length : ('k, 'd) t -> int

Returns an upper bound on the length of the bucket.

Sourceval clear : ('k, 'd) t -> unit

Remove all ephemerons from the bucket.