tuple

type tuple < function, sequence

An immutable tuple of values.

(Tuple: tuple)(Arg₁, ..., Argₙ)

Returns (Tuple[1](Arg₁, ..., Argₙ), ..., Tuple[k](Arg₁, ..., Argₙ))

fun tuple(Value₁: any, : ..., Valueₙ: any): tuple

Returns a tuple of values Value₁, ..., Valueₙ.

meth (A: tuple) != (B: tuple): B | nil

Returns B if A:size != B:size or Aᵢ != Bᵢ for some i.

!=((1, 2, 3), (1, 2, 3)) :> nil
!=((1, 2, 3), (1, 2)) :> (1, 2)
!=((1, 2), (1, 2, 3)) :> (1, 2, 3)
!=((1, 2, 3), (1, 2, 4)) :> (1, 2, 4)
!=((1, 3, 2), (1, 2, 3)) :> (1, 2, 3)
meth (A: tuple) < (B: tuple): B | nil

Returns B if Aᵢ = Bᵢ for each i = 1 .. j-1 and Aⱼ < Bⱼ.

<((1, 2, 3), (1, 2, 3)) :> nil
<((1, 2, 3), (1, 2)) :> nil
<((1, 2), (1, 2, 3)) :> (1, 2, 3)
<((1, 2, 3), (1, 2, 4)) :> (1, 2, 4)
<((1, 3, 2), (1, 2, 3)) :> nil
meth (A: tuple) <= (B: tuple): B | nil

Returns B if Aᵢ = Bᵢ for each i = 1 .. j-1 and Aⱼ <= Bⱼ.

<=((1, 2, 3), (1, 2, 3)) :> (1, 2, 3)
<=((1, 2, 3), (1, 2)) :> nil
<=((1, 2), (1, 2, 3)) :> (1, 2, 3)
<=((1, 2, 3), (1, 2, 4)) :> (1, 2, 4)
<=((1, 3, 2), (1, 2, 3)) :> nil
meth (Tuple₁: tuple) <> (Tuple₂: tuple): integer

Returns -1, 0 or 1 depending on whether Tuple₁ is less than, equal to or greater than Tuple₂ using lexicographical ordering.

meth (A: tuple) = (B: tuple): B | nil

Returns B if A:size = B:size and Aᵢ = Bᵢ for each i.

=((1, 2, 3), (1, 2, 3)) :> (1, 2, 3)
=((1, 2, 3), (1, 2)) :> nil
=((1, 2), (1, 2, 3)) :> nil
=((1, 2, 3), (1, 2, 4)) :> nil
=((1, 3, 2), (1, 2, 3)) :> nil
meth (A: tuple) > (B: tuple): B | nil

Returns B if Aᵢ = Bᵢ for each i = 1 .. j-1 and Aⱼ > Bⱼ.

>((1, 2, 3), (1, 2, 3)) :> nil
>((1, 2, 3), (1, 2)) :> (1, 2)
>((1, 2), (1, 2, 3)) :> nil
>((1, 2, 3), (1, 2, 4)) :> nil
>((1, 3, 2), (1, 2, 3)) :> (1, 2, 3)
meth (A: tuple) >= (B: tuple): B | nil

Returns B if Aᵢ = Bᵢ for each i = 1 .. j-1 and Aⱼ >= Bⱼ.

>=((1, 2, 3), (1, 2, 3)) :> (1, 2, 3)
>=((1, 2, 3), (1, 2)) :> (1, 2)
>=((1, 2), (1, 2, 3)) :> nil
>=((1, 2, 3), (1, 2, 4)) :> nil
>=((1, 3, 2), (1, 2, 3)) :> (1, 2, 3)
meth (Tuple: tuple)[Index: integer]: any | error

Returns the Index-th element in Tuple or an error if Index is out of interval. Indexing starts at 1. Negative indices count from the end, with -1 returning the last element.

meth (Tuple: tuple):size: integer

Returns the number of elements in Tuple.

meth (Buffer: string::buffer):append(Value: tuple)

Appends a representation of Value to Buffer.

meth (Copy: visitor):const(Tuple: tuple): tuple

Returns a new tuple containing copies of the elements of Tuple created using Copy.

meth (Copy: visitor):copy(Tuple: tuple): tuple

Returns a new tuple containing copies of the elements of Tuple created using Copy.

meth (Arg₁: visitor):visit(Arg₂: tuple)

TBD