third ( seq -- third )
Factor documentation > Factor handbook > The language > Collections > Sequence operations > Accessing sequence elements
Prev:second ( seq -- second )
Next:fourth ( seq -- fourth )


Vocabulary
sequences

Inputs and outputs
seqa sequence
thirdthe third element of the sequence


Word description
Outputs the third element of the sequence.

Errors
Throws an error if the sequence contains less than three elements.

Definition
USING: kernel ;

IN: sequences

: third ( seq -- third ) 2 swap nth ; inline