NEXT ·  UP ·  PREVIOUS ·  CONTENTS ·  INDEX

Arrays

Lists are the central datatype in applicative programming. In imperative programming the array is the central datatype. Arrays are provided in a type-safe way in Standard ML through the use of the following operations of the Array structure in the Standard ML library.

The Array.array type constructor admits equality and the equality which is provided is equality of reference. Thus, given the following declarations,

val a = Array.fromList [1];
val b = Array.fromList [1];

then a and b are not equal.

NEXT ·  UP ·  PREVIOUS ·  CONTENTS ·  INDEX