#v {[a] int :: (a in any)}
Returns the length of a sequence.
dist(a, l) {(a, int) [a] :: (a in any)}
Generates a sequence of length l with the value a
in each element.
For example:
4pt
elt(a, i) {([a], int) a :: (a in any)}
Extracts the element specified by index i from the
sequence a. Indices are zero-based.
rep(d, v, i) {([a], a, int) [a] :: (a in any)}
Replaces the ith value in the sequence d with the
value v.
For example:
4pt
zip(a, b) {([b], [a]) [(b, a)] :: (a in any; b in any)}
Zips two sequences of equal length together into a single sequence
of pairs.
unzip(a) {[(b, a)] ([b], [a]) :: (a in any; b in any)}
Unzips a sequence of pairs into a pair of sequences.