tuple¶
type tuple < function, sequenceAn immutable tuple of values.
(Tuple: tuple)(Arg₁, ..., Argₙ)Returns
(Tuple[1](Arg₁, ..., Argₙ), ..., Tuple[k](Arg₁, ..., Argₙ))
fun tuple(Value₁: any, : ..., Valueₙ: any): tupleReturns a tuple of values
Value₁, ..., Valueₙ.meth (A: tuple) != (B: tuple): B | nilReturns
BifA:size != B:sizeorAᵢ != 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 | nilReturns
BifAᵢ = Bᵢfor eachi = 1 .. j-1andAⱼ < 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 | nilReturns
BifAᵢ = Bᵢfor eachi = 1 .. j-1andAⱼ <= 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): integerReturns
-1,0or1depending on whetherTuple₁is less than, equal to or greater thanTuple₂using lexicographical ordering.meth (A: tuple) = (B: tuple): B | nilReturns
BifA:size = B:sizeandAᵢ = 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 | nilReturns
BifAᵢ = Bᵢfor eachi = 1 .. j-1andAⱼ > 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 | nilReturns
BifAᵢ = Bᵢfor eachi = 1 .. j-1andAⱼ >= 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 | errorReturns the
Index-th element inTupleor an error ifIndexis out of interval. Indexing starts at1. Negative indices count from the end, with-1returning the last element.meth (Tuple: tuple)[Name: string]: any | errorReturns the element in
TuplenamedNameor an error if no such named element exists.meth (Tuple: tuple):size: integerReturns the number of elements in
Tuple.meth (Buffer: string::buffer):append(Value: tuple)Appends a representation of
ValuetoBuffer.meth (Buffer: string::buffer):append(Value: tuple, Arg₃: string)Appends a representation of
ValuetoBuffer.meth (Copy: visitor):const(Tuple: tuple): tupleReturns a new tuple containing copies of the elements of
Tuplecreated usingCopy.meth (Copy: visitor):copy(Tuple: tuple): tupleReturns a new tuple containing copies of the elements of
Tuplecreated usingCopy.meth (Arg₁: visitor):visit(Arg₂: tuple)TBD