<< Prev | - Up - | Next >> |

The module `Tuple`

contains procedures operating on tuples.

`IsTuple`

`{Tuple.is`

`+`

*X*`?`

*B*`}`

tests whether

is a tuple.*X*`MakeTuple`

`{Tuple.make`

`+`

*L*`+`

*I*`?`

*T*`}`

binds

to new tuple with label*T*

and fresh variables at features*L*`1`

through

.*I*

must be non-negative, else an error exception is raised.*I*For example,

`{MakeTuple L N T}`

waits until`L`

is bound to a literal, say`b`

, and`N`

is bound to a number, say`3`

, whereupon`T`

is bound to`b(_ _ _)`

.`toArray`

`{Tuple.toArray`

`+`

*T*`?`

*A*`}`

returns an array with bounds between

`1`

and`{Width`

*T*`}`

, where the elements of the array are the subtrees of

.*T*`append`

`{Tuple.append`

`+`

*T1*`+`

*T2*`?`

*T3*`}`

returns a tuple with same label as

. Given that*T2*

has width*T1**i*and

has width*T2**j*,

will have width*T3**i*`+`

*j*, and the first*i*fields of

will be the same as the fields of*T3*

in their original order, and the fields*T1**i*`+ 1`

through*i*`+`

*j*will be the same as the fields of

in their original order.*T2*

<< Prev | - Up - | Next >> |

Denys Duchier, Leif Kornstaedt and Christian Schulte

Version 1.4.0 (20080702)