1make-tuple ( x class assoc -- tuple )
Tuple-constructing combinators

Next:2make-tuple ( x y class assoc -- tuple )


Vocabulary
combinators.tuple

Inputs
xan object
classa class
assoca list of string/quotation pairs


Outputs
tuplea tuple


Word description
Constructs a tuple of class by calling the quotations making up the values of assoc on x, assigning the result of each call to the slot named by the corresponding key. The quotations must have the effect ( x -- slot-value ). The order in which the quotations are called is undefined.

Examples
USING: combinators.tuple math prettyprint ; IN: scratchpad TUPLE: demo x y z ; 5 demo { { "x" [ 10 + ] } { "y" [ 100 / ] } } 1make-tuple .
T{ demo { x 15 } { y 1/20 } }


See also
2make-tuple, 3make-tuple, nmake-tuple

Definition

: 1make-tuple ( x class assoc -- tuple ) 1 nmake-tuple ; inline