remove-nth ( n seq -- seq' )
Factor handbook > The language > Collections > Sequence operations > Adding and removing sequence elements

Prev:remove-eq ( elt seq -- newseq )


Vocabulary
sequences

Inputs and outputs
nan integer
seqa sequence
seq'a sequence


Word description
Creates a new sequence without the element at index n.

Examples
Notice that the original sequence is left intact:
USING: sequences prettyprint kernel ; { 1 2 3 } 1 over remove-nth . .
{ 1 3 } { 1 2 3 }


See also
remove, remove-eq, remove-eq!, remove!, remove-nth!

Definition