Tuples (Base Types)

The following examples show tuple values and their tuple types.

val t1 = @("I'm a flat tuple", 42, true): @(string, int, bool)
val t2 = ("I'm a flat tuple", 42, true): @(string, int, bool)
val t3 = $tup("I'm a boxed tuple", 42, true): $tup(string, int, bool)
val t4 = '("I'm a boxed tuple", 42, true): $tup(string, int, bool)

And to access each part of a tuple, use 0-based index, or pattern matching as follows

val t = @("I'm a flat tuple", 42, true)
val @(x, y, _) = t
val _ = assertloc (t.0 = x)