Factory methods for Sequences |
What it is | What it does |
S.empty | The empty sequence. |
S(x, y, z) | A sequence consisting of elements x, y, z. |
S.concat(xs, ys, zs)
| The sequence obtained by concatenating the elements
of xs, ys, zs. |
S.fill(n){e}
| A sequence of length n where each element is computed by
expression e. |
S.fill(m, n){e}
| A sequence of sequences of dimension m×n
where each element is computed by expression e.
(exists also in higher dimensions). |
S.tabulate(n){f}
| A sequence of length n where the element at each index
i is computed by f(i). |
S.tabulate(m, n){f}
| A sequence of sequences of dimension m×n
where the element at each index
(i, j) is computed by f(i, j).
(exists also in higher dimensions). |
S.range(start, end)
| The sequence of integers start ... end-1. |
S.range(start, end, step)
| The sequence of integers starting with start and
progressing by step increments up to, and excluding, the
end value. |
S.iterate(x, n)(f)
| The sequence of length n with elements
x, f(x), f(f(x)), ....
|