Skip to main content

ARRAY

Constant ARRAY 

Source
pub const ARRAY: BuiltinSchema;
Expand description

Array<T>: the fixed-length immutable sequence.

get answers an Option rather than trapping, so an index outside the array is a value the caller has to open rather than a stopped program.

contains, indexOf, and slice are the three questions about the order and the membership of a sequence, and map, filter, fold, and sorted are the four it walks with a closure. All seven are declared once above, because a Vector has the same seven.

toVector is the one direction Vector does not answer for itself, and it is the inverse of Vector.toArray.