package clarity

  1. Overview
  2. Docs

Efficient construction of vectors using mutable, one-by-one appending of elements

type 'a vector = 'a t
type _ t
val empty : unit -> 'a t

Creates new empty builder.

val copy : 'a t -> 'a t

Create copy of this builder.

val put : 'a t -> 'a -> unit

Put element to builder.

val clear : 'a t -> unit

Clear builder.

val result : 'a t -> 'a vector

Get vector of current elements in builder.

OCaml

Innovation. Community. Security.