package inferno

  1. Overview
  2. Docs

This module implements infinite arrays, that is, arrays that grow transparently upon demand.

type 'a t

An infinite array of type 'a t is a (mutable) array whose indices range over the interval of zero to infinity. *

val make : int -> 'a -> 'a t

make n x creates an infinite array where every slot contains x. The parameter n is the initial physical size of the underlying OCaml array. It must be nonzero. *

val get : 'a t -> int -> 'a

get a i reads the value stored at index i in the infinite array a. *

val set : 'a t -> int -> 'a -> unit

set a i x stores the value x at index i in the infinite array a. *

OCaml

Innovation. Community. Security.