<slot-ref> ( tuple slot -- slot-ref )
Factor handbook » The language » Collections » References » Reference implementations

Prev:slot-ref
Next:Boxes as references


Vocabulary
refs

Inputs
tuplea tuple
slotan integer


Outputs
slot-refa slot-ref


Word description
Creates a reference to the value in a particular slot of the given tuple. The slot must be given as an integer, where the first user-defined slot is number 2. This is mostly just a proof of concept until we have a way of generating this slot number from a slot name.

See also
<obj-ref>, <var-ref>, <global-var-ref>, <key-ref>, <value-ref>

Definition


: <slot-ref> ( tuple slot -- slot-ref ) \ slot-ref boa ; inline