package mergeable-vector

  1. Overview
  2. Docs
On This Page
  1. Vector
Legend:
Library
Module
Module type
Parameter
Class
Class type

Vector

type atom

The type of vector element.

type t

The type of vector.

val length : t -> int

Length of vector.

val set : t -> int -> atom -> t

set v i e updates the element at position i in v to e.

Raise Invalid_argument "index out of bounds" if i is outside the range 0 to length v - 1.

val get : t -> int -> atom

get v i returns the element at position i in v.

Raise Invalid_argument "index out of bounds" if i is outside the range 0 to length v - 1.

val insert : t -> int -> atom -> t

insert v i e inserts the element e at position i in v.

Raise Invalid_argument "index out of bounds" if i is outside the range 0 to length v.

val delete : t -> int -> t

delete v i deletes the element at position i in v.

Raise Invalid_argument "index out of bounds" if i is outside the range 0 to length v - 1.

OCaml

Innovation. Community. Security.