An array stores elements at indexed positions. Recursive algorithms can traverse those positions explicitly, stopping when the next index would exceed the array’s length. section 2.7
Arrays support both functional traversal and controlled mutation:
- A tail-recursive loop can compare neighboring elements, return false when the supplied ordering function fails, and otherwise continue to the next index. section 2.7
- An STArray can allocate, read, write, and freeze an array while keeping every access inside an ST action. section 14.2.4 section 14.5
- Generic array creation requires a ClassTag[A], and arrays can be initialized from a size and default value or constructed from a List. section 14.2.4







































