set-first ( first seq -- ) - Factor Documentation

set-first ( first seq -- )


Vocabulary
sequences

Inputs
first an object
seq a sequence


Outputs
None

Word description
Sets the first element of a sequence.

Examples
USING: prettyprint kernel sequences ; { 1 2 3 4 } 5 over set-first .
{ 5 2 3 4 }


See also
set-second , set-third , set-fourth

Definition
USING: kernel ;

IN: sequences

: set-first ( first seq -- ) 0 swap set-nth ; inline

AltStyle によって変換されたページ (->オリジナル) /