- A tuple is an infinite sequence of components,
of which only a finite number are defined.
The components may be of any type, mixed heterogeneously. The values of
components may be repeated.
- The order of the components of a tuple is significant.
By treating the tuple as a function over the integers,
you can extract individual components and slices of the tuple.
OM
is a legal value for a component.
- An expression, or several expressions separated
by commas, and, in either case, enclosed by
[]
, evaluates to a
tuple whose defined components are the
values of the enclosed expressions.
- The empty tuple is denoted by
[]
.
- The syntactic forms for tuples of finite arithmetic progressions
and tuple formers are similar to those provided for sets.
The only difference is the use of square,
rather than curly, brackets.
- The length of a tuple is the largest index (counting from 1) for which
a component is defined (that is, is not equal to
OM
).
It can change at run-time.