MONO_DYNAMIC_ARRAY
signature
signature MONO_DYNAMIC_ARRAY
The MONO_DYNAMIC_ARRAY signature specifies an interface to dynamic monomorphic arrays. These act like arrays of unbounded length.
type elem
type array
val array : (int * elem) -> array
val subArray : (array * int * int) -> array
val fromList : (elem list * elem) -> array
val tabulate : (int * (int -> elem) * elem) -> array
val default : array -> elem
val sub : (array * int) -> elem
val update : (array * int * elem) -> unit
val bound : array -> int
val truncate : (array * int) -> unit
type elem
type array
array (sz, el)
subArray (arr, lo, hi)
fromList (l, el)
tabulate (sz, f, el)
default arr
sub (arr, i)
update
, it returns the default value. Raises Subscript if i < 0. Note that no exception is raised for an index too large.
update (arr, i, el)
bound arr
truncate (arr, sz)
DynamicArrayFn, MONO_ARRAY
Last Modified June 9, 1998
Comments to John Reppy
Copyright © 1998 Bell Labs, Lucent Technologies