keen/col/array

Source
This is a standard module and does not need to be explicitly imported.
array[t] builtin
array-view[t] record (has private fields)
subscript[t] t(a t[], index nat64)
subscript[t] t(a t array-view, index nat64)
subscript[t] t array-view(a t[], indices nat64 range)
subscript[t] t array-view(a t array-view, indices nat64 range)
subscript[t] t(a t[], index index-relative-to-end)
subscript[t] t(a t array-view, index index-relative-to-end)
subscript[t] t array-view(a t[], indices range-relative-to-end)
subscript[t] t array-view(a t array-view, indices range-relative-to-end)
list-new[t] t[](a t[])
size[t] nat64(a t[])
size[t] nat64(a t array-view)
to[t] t[](a t range) t rangeable, t difference
to[t] t[](a t array-view)
is-empty[t] bool(a t[])
true if a.size == 0.
is-empty[t] bool(a t array-view)
~[t] t[](a t, b t[])
Prepend an element to an array. This is O(n).
~[t] t[](a t, b t array-view)
~[t] t[](a t[], b t)
Append an element to an array. This is O(n).
~[t] t[](a t array-view, b t)
~~[t] t[](a t[], b t[])
Concatenates two arrays. This is O(n).
~~[t] t[](a t array-view, b t array-view)
==[t] bool(a t[], b t[]) t equal
==[t] bool(a t array-view, b t array-view) t equal
<=>[t] comparison(a t[], b t[]) t compare
update-at[t] t[](a t[], index nat64, new-value t)

Returns a new array like a but where a[index] is replaced with new-value. This is O(n).

index must be a valid index into a. This can't be used to add a value to the end.

update-at[t] t[](a t array-view, index nat64, new-value t)
insert-at[t] t[](a t[], index nat64, value t)
Inserts an element at index. Moves all elements that were at index or after to the right. Unlike for update-at, index can be a.size, though it still can't be higher.
insert-at[t] t[](a t array-view, index nat64, value t)
remove-at[t] t[](a t[], index nat64)
Removes the element at index, shifting all later elements to the left.
remove-at[t] t[](a t array-view, index nat64)
hash[t] void(a t[], state hash-state) t hash
hash[t] void(a t array-view, state hash-state) t hash
some[t] bool(a t[], f bool mut(t))
some[t] bool(a t array-view, f bool mut(t))
some-reverse[t] bool(a t[], f bool mut(t))
some-reverse[t] bool(a t array-view, f bool mut(t))
array-iterator[t] record (has private fields)
begin[t] t array-iterator(a t[])
begin[t] t array-iterator(a t array-view)
end[t] t array-iterator(a t[])
end[t] t array-iterator(a t array-view)
copy[t] t array-iterator(a t array-iterator)
is-at-begin[t] bool(a t array-iterator)
is-at-end[t] bool(a t array-iterator)
index[t] nat64(a t array-iterator)
If a iterates an array-view, this is the index relative to the view.
set-index[t] void(a t array-iterator, index nat64)
take-prev[t] t(a t array-iterator)
peek[t] t option(a t array-iterator)
peek-prev[t] t option(a t array-iterator)
take-next[t] t(a t array-iterator)
take-next-n[t] t array-view(a t array-iterator, n nat64)
take-prev-n[t] t array-view(a t array-iterator, n nat64)
skip-next-n[t] void(a t array-iterator, n nat64)
skip-prev-n[t] void(a t array-iterator, n nat64)
slice[t] t array-view(begin t array-iterator, end t array-iterator)