| | 59 | == Sequence Operations == |
| | 60 | |
| | 61 | The following operations are available for arrays: |
| | 62 | |
| | 63 | * `int $length(T a[[]])` |
| | 64 | * returns the number of elements in this array |
| | 65 | * `T[[]] $concat(T a[[]], Tb[[]])` |
| | 66 | * returns the concatenation of two arrays |
| | 67 | * `T[[]] $add(T a[[]], T x)` |
| | 68 | * returns the result of adding the element `x` to the end of array `a` |
| | 69 | * `T[[]] $remove(T a[[]], int i)` |
| | 70 | * returns the result of removing the element at index `i` from the array `a` (with subsequent element shifted down) |
| | 71 | * `T[[]] $subseq(T a[[]], int start, int end)` |
| | 72 | * returns the subsequence of `a` starting at index `start` and ending at index `end-1` |
| | 73 | * `T[[]] $write(T a[[]], int i, T x)` |
| | 74 | * returns the sequence obtained by replacing the element of `a` at index `i` with `x` |
| | 75 | |