Seq[A: A]¶
A mutable sequence of elements.
Types with a fixed number of elements that can be read and written by index implement this interface. For sequences that can grow and shrink, see ResizableSeq.
Public Functions¶
size¶
Returns the number of elements in the sequence.
Returns¶
- USize val
apply¶
Returns the i-th element of the sequence. Raises an error if the index is out of bounds.
Parameters¶
- i: USize val
Returns¶
- this->A ?
update¶
Replaces the i-th element of the sequence, returning the previous value. Raises an error if the index is out of bounds.
Parameters¶
- i: USize val
- value: A
Returns¶
- A^ ?
values¶
Returns an iterator over the elements of the sequence.
Returns¶
- Iterator[this->A] ref^