package inferno

  1. Overview
  2. Docs
type 'a t

This module implements infinite arrays. *

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

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

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

get a i returns the element contained at offset i in the array a. Slots are numbered 0 and up. *

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

set a i x sets the element contained at offset i in the array a to x. Slots are numbered 0 and up. *

OCaml

Innovation. Community. Security.