4.13 Tuples

Tuples are special records with integer as for instance f(X1 X2 X3) which is equal to f(1:X1 2:X2 3:X3). The values of the features of a tuple can be arbitrary. The functionality of tuples is mostly inherited from that for record.

The Oz syntax supports the special tuple constructor # that can be written in infix notation. It can be used to construct tuples like b#c which is equal to #(b c). More generally, it holds that

  X1#X2#...#Xn = #(X1 X2 ... Xn)

We can also use this tuple constructor to built nested tuples. In this case we have to write paranthesis explicitely. For instance:

  X1#(X2#X3) = #(X1 #(X2 X3))


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)