-
Notifications
You must be signed in to change notification settings - Fork 1
Tuple
Johannes Zottele edited this page Sep 19, 2022
·
2 revisions
Tuples are a generic datastructure that can hold a arbitrary set of heterogen typed values. Tuples support unpackaging and are the only class that uses numbers as property names.
You can access elements via its indices, but not via index access, instead you use property access.
a = (1, true)
print(a.0) // "1"
print(a.1) // "true"