Skip to content

Tuple

A tuple is a container with a collection of inhabitants with the same or different term types. Its size is fixed, and it cannot be empty.

Constructor

workspace

Fig. 1: Tuple constructor

(true, "is", 1)
(true, "is", 1)

workspace

Fig. 2: Binding a tuple

val tuple_constructor = (true, "is", 1)
val tuple_constructor = (true, "is", 1)

Projection

Projection is an operator that retrieves one element from a tuple at a specific location.

workspace

Fig. 3: Tuple projection

val tuple_constructor = (true, "is", 1)
val projection = (#1 tuple_constructor)
val tuple_constructor = (true, "is", 1)
val projection = (tuple_constructor(1))