package ocaml-base-compiler

Part of the compiler
  1. Overview
  2. Docs
Official release 4.14.5

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml_4.14.5.tar.gz
sha256=608c30e5b97fc4568741db8e5e674a5a081ef08a3c4d17172deb1dc6c8825037

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.