Tuple
Module
Implements the Tuple class.
TupleLiteral
The type of a literal tuple expression.
A tuple consists of zero or more values, separated by commas.
Parameters:
- Ts (
*AnyType
): The elements type.
Fields:
storage
The underlying storage for the tuple.
Functions:
__init__
__init__(args: !pop.pack<Ts>) -> Self
Construct the tuple.
Args:
- args (
!pop.pack<Ts>
): Initial values.
Returns:
Constructed tuple.
__len__
__len__(self: Self) -> Int
Get the number of elements in the tuple.
Returns:
The tuple length.
get
get[i: Int, T: AnyType](self: Self) -> T
Get a tuple element.
Parameters:
- i (
Int
): The element index. - T (
AnyType
): The element type.
Returns:
The tuple element at the requested index.