builtin/array/Arraystruct

A list of items.

Methods
len : [ ] -> Integer

The number of items in the array.

is_empty : [ ] -> Boolean

Returns true if the array contains no items.

get : [ index : Integer ] -> Option<ItemType>

Returns the item at index. Negative numbers count from the end.

push : [ item : ItemType ] -> Nothing

Append an item to the end of the array.

insert : [ index : Integer item : ItemType ] -> Nothing

Insert an item at index. Negative numbers count from the end.

append : [ other : Array ] -> Nothing

Extends the array by appending each item in other to the end.

pop : [ ] -> Option<ItemType>

Removes the last item and returns it.

remove : [ index : Integer ] -> ItemType

Remove the item at index. Negative numbers count from the end.

clear : [ ] -> Nothing

Removes all items in the array.

truncate : [ len : Integer ] -> Nothing

Removes items until the array’s length matches len. If len is greater than the array’s length, This has no effect. Negative numbers count from the end.

reverse : [ ] -> Nothing

Reverses the order of items in the array.

iter : [ ] -> IterType
eq : [ other : OtherType ] -> Boolean