Tuple Subscription
rascal-0.40.17
Synopsis
Retrieve a tuple field by its index position.
Syntax
Exp₁ [ Exp₂ ]
Description
Subscription retrieves the tuple element with index Exp₂ from the tuple value of Exp₁.
Examples
Introduce a tuple, assign it to T and retrieve the element with index 0:
rascal>T = <"mon", 1>;
tuple[str,int]: <"mon",1>
rascal>T[0];
str: "mon"
---
mon
---