A finite sequence of elements.
interface list[combivariant value element]
subtypes collection[element]
Read the list's element for the specified index.
implicit readonly reference[element] get(nonnegative index) pure
implicit mutable reference[element] at(nonnegative index) mutable pure
not yet implemented implicit writeonly reference[element] set(nonnegative index) writeonly pure
Access the first element of the list. Assumes the list is not empty.
element first readonly
Access the last element of the list. Assumes the list is not empty.
element last readonly
not yet implemented void prepend all(readonly list[element] the list)
not yet implemented void insert(nonnegative index, element the element)
not yet implemented void insert all(nonnegative index, readonly list[element] the list)
not yet implemented element remove at(nonnegative index)
Skips over the specified count of elements and returns an immutable slice that begins with count and ends with the end of this list.
immutable list[element] skip(nonnegative count) pure
Returns an immutable sublist with the given the starting and ending indices.
The starting index is inclusive, the ending is exclusive.
immutable list[element] slice(nonnegative begin, nonnegative end) pure
not yet implemented readonly list[element] reverse() pure
Returns an immutable list with the order of the elements reversed.
immutable list[element] reverse() immutable pure
Returns an immutable copy of this list.
immutable list[element] frozen copy() pure
Check whether the list has at least one element that satisfies the predicate.
boolean has(predicate[element] the predicate) pure
Sort the list in place using the given sort order.
void sort(order[element] the order)