Navigation
Synopsis An ordered, fixed length, sequence of values of possibly different type.
Description A tuple is an ordered fixed length sequence of values of possibly different type.

In Rascal a tuple is written as < V1, ..., Vn > and a tuple type has the form type[T1, ..., Tn], Ti represents the type of element i. Tuple have two major applications:
  • As tuples in a Relation.
  • For ad-hoc packaging of values, for instance, to return multiple-values from a function.
See Rascal:Values/Tuple for the operations on tuples.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.