values -> indices {([a], [int]) [a] :: (a in any)}
Given a sequence of values on the left and a sequence of
indices on the right, which can be of different lengths,
-> returns a sequence which is the same length as the
indices sequence and the same type as the values sequence.
For each position in the indices sequence, it reads the value
at that index of the values sequence.
For example:
4pt
permute(v, i) {([a], [int]) [a] :: (a in any)}
Given a sequence v and a sequence of indices i,
which must be of the same length, permute permutes the
values to the given indices. The permutation must be one-to-one.
d <- ivpairs {([a], [(int, a)]) [a] :: (a in any)}
This operator, called write, is used to write multiple elements into a
sequence. Its left argument is the sequence to write into (the
destination sequence) and its right argument is a sequence of
integer-value pairs. For each element (i,v) in the sequence of
integer-value pairs, the value v is written into position
i of the destination sequence.
rotate(a, i) {([a], int) [a] :: (a in any)}
Given a sequence and an integer, rotate rotates the sequence
around by i positions to the right. If the integer is negative, then
the sequence is rotated to the left.
For example:
4pt
reverse(a) {[a] [a] :: (a in any)}
Reverses the order of the elements in a sequence.