package hachis

  1. Overview
  2. Docs
type element

The type of elements.

type t

The type of arrays.

val empty : t

empty is the empty array.

val make : int -> element -> t

make n x returns a new array of length n, where every slot contains the value x.

val copy : t -> t

copy a returns a new array whose length and content are those of the array a.

val length : t -> int

length a returns the length of the array a.

val unsafe_get : t -> int -> element

unsafe_get a i returns the element found at index i in the array a. The index i must be valid.

val unsafe_set : t -> int -> element -> unit

unsafe_set a i x writes the value x at index i in the array a. The index i must be valid.

val fill : t -> int -> int -> element -> unit

fill a o k x fills the array segment identified by array a, offset o, and length k with the value x.

OCaml

Innovation. Community. Security.