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
ifA:size != B:size
orAᵢ != Bᵢ
for somei
.!=((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
ifAᵢ = Bᵢ
for eachi = 1 .. j-1
andAⱼ < 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
ifAᵢ = Bᵢ
for eachi = 1 .. j-1
andAⱼ <= 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
or1
depending on whetherTuple₁
is less than, equal to or greater thanTuple₂
using lexicographical ordering.meth (A: tuple) = (B: tuple): B | nil
Returns
B
ifA:size = B:size
andAᵢ = Bᵢ
for eachi
.=((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
ifAᵢ = Bᵢ
for eachi = 1 .. j-1
andAⱼ > 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
ifAᵢ = Bᵢ
for eachi = 1 .. j-1
andAⱼ >= 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 inTuple
or an error ifIndex
is out of interval. Indexing starts at1
. 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
toBuffer
.meth (Buffer: string::buffer):append(Value: tuple, Arg₃: string)
Appends a representation of
Value
toBuffer
.meth (Copy: visitor):const(Tuple: tuple): tuple
Returns a new tuple containing copies of the elements of
Tuple
created usingCopy
.meth (Copy: visitor):copy(Tuple: tuple): tuple
Returns a new tuple containing copies of the elements of
Tuple
created usingCopy
.meth (Arg₁: visitor):visit(Arg₂: tuple)
TBD