set-length ( n seq -- )
Factor handbook > The language > Collections > Sequence operations > Sequence protocol

Prev:set-nth-unsafe ( elt n seq -- )
Next:lengthen ( n seq -- )


Vocabulary
sequences

Inputs and outputs
na non-negative integer
seqa resizable sequence


Generic word contract
Resizes a sequence. The initial contents of the new area is undefined.

Errors
Throws a no-method error if the sequence is not resizable, and a bounds-error if the new length is negative.

Side effects
Modifies seq

Definition


Methods