Tuple types

The type(A,B)is a type for binary tuples (pairs) of values, one of typeAand another of typeB.The type(A,B,C)is a triple, and so on.

The type(A)is the same as the typeAand is not considered a tuple.

The nullary tuple type()is the type of the unique value also written()and is pronounced “unit”.

In the standard Unison syntax, tuples ofarity2 and higher are actually of a typeTuple a bfor some typesaandb.For example,(X,Y)is syntactic shorthand for the typeTuple X (Tuple Y ()).

Tuples are either constructed with the syntactic shorthand(a,b)(seetuple literals)or with the built-inTuple.Consdata constructor:(a, b).