Module type Gist.ARRAY

Array interface.

type t

The type for arrays.

type elt

The type of elements of the array.

val get : t -> int -> elt

get a i is the ith zero-based element of a.

val set : t -> int -> elt -> unit

set a i v sets the ith zero-based element of a to v.

val length : t -> int

length a is the length of a.

val init : int -> (int -> elt) -> t

init n f is an array of length n with get v i = f i.

val iter : (elt -> unit) -> t -> unit

iter iterates over all elements of the array in increasing index order.

val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold_left f init a folds f over a's elements in increasing index order starting with init.

val type_name : string

type_name is a type name for the array.