Skip to content
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.


Properties

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"

Clone this wiki locally