GNU TeXmacsUser manualReferenceAboutEnglish·Deutsch·中文
Operations on tuples
<tuple|expr-1|\(\cdots\)|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 (counting from zero) in tuple; more generally, tuple may be any compound tree. 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|\(\cdots\)|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 .

<occurs-inside|expr|var>
(occurrence test)

Returns true if the evaluated expr occurs as a subtree of the (unevaluated) value of the macro argument with name var, and false otherwise.

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".