Operations on tuples

<tuple|expr-1||expr-n>
(construct a tuple)

Forms a tuple from the expressions expr-1 until expr-n.

<is-tuple|expr>
(tuple predicate)

Tests whether a given expression expr evaluates to a tuple.

<length|expr>
(length of a tuple)

If expr is a tuple, then we return its arity. For instance, <length|<tuple|hop|hola>> evaluates to 2.

<look-up|tuple|which>
(access an entry in a tuple)

Returns the element with index which in tuple. For instance, <look-up|<tuple|a|b|c>|1> yields b.

<range|expr|start|end>
(extract a subtuple)

Return the subtuple of expr starting at position start and ending at position end (not included). For instance, <range|<tuple|a|hola|hop|b|c>|2|4> evaluates to .

<merge|expr-1||expr-n>
(concatenate tuples)

This primitive may be used to concatenate several tuples expr-1 until expr-n. For instance, <merge|<tuple|1|2>|<tuple|3|4|5>> produces .

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".