val make : 'a -> 'a t
make x
creates an infinite array, where every slot containsx
. *
val get : 'a t -> int -> 'a
get a i
returns the element contained at offseti
in the arraya
. Slots are numbered 0 and up. *
val set : 'a t -> int -> 'a -> unit
set a i x
sets the element contained at offseti
in the arraya
tox
. Slots are numbered 0 and up. *
val extent : 'a t -> int
extent a
is the length of an initial segment of the arraya
that is sufficiently large to contain allset
operations ever performed. In other words, all elements beyond that segment have the default value.
val domain : 'a t -> 'a array
domain a
is a fresh copy of an initial segment of the arraya
whose length isextent a
.