package core_extended

  1. Overview
  2. Docs

Module Expert.Append_only_bufferSource

Sourcetype 'a t

A buffer of items which can grow in size by appending to the end.

Sourceval create : ?capacity:int -> unit -> 'a t
Sourceval append : 'a t -> 'a -> unit
Sourceval nth_exn : 'a t -> int -> 'a
Sourceval of_list : 'a list -> 'a t
Sourceval to_list : 'a t -> 'a list
Sourceval to_array : 'a t -> 'a array
Sourceval length : 'a t -> int
Sourceval lax_clear : 'a t -> unit

Clear the buffer so it is empty again.

This is lax in that clearing the buffer does not necessarily allow things that were in the buffer to be garbage collected.

OCaml

Innovation. Community. Security.