Closed KristianBalaj closed 3 years ago
Of course the indexing would be just for getting the values. (since the tuples are written in immutable fashion)
const t = const Tuple2<String, int>('a', 10);
print(t.item1); // prints 'a'
print(t.item2); // prints '10'
Isn't this snippet from the README.md what you meant only in a different form? Maybe this is already because of your issue if so you can close this issue 😄
What would be the return type of operator []
for Tuple2<int, String>
? It's hard to reason.
@znjameswu yeah, you're right. That's a real problem. We don't want dynamic return, I should close the issue then.
Hey nice work with the tuples 👋
I would like to propose a feature, to make the tuples indexable.
Example:
This code prints '1' and '2'.
RangeError
is thrownYou could assign me and I would do the PR.