>tuple ( seq -- tuple )
Factor handbook » The language » Objects » Tuples » Tuple introspection

Next:tuple>array ( tuple -- array )


Vocabulary
classes.tuple

Inputs
seqa sequence


Outputs
tuplea tuple


Word description
Creates a tuple with slot values taken from a sequence. The first element of the sequence must be a tuple class word and the remainder the declared slots.

If the sequence has too few elements, the remaining slots in the tuple are set to their initial values.

Errors
Throws an error if one of the following occurs:
the first element of the sequence is not a tuple class word
the values in the sequence do not satisfy the slot class predicates
the sequence is too long


Definition