Handbook
Glossary
delete-all ( seq -- )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Destructive sequence operations
Prev:
delete-slice ( from to seq -- )
Next:
filter! ( ... seq quot: ( ... elt -- ... ? ) -- ... seq )
Vocabulary
sequences
Inputs
seq
a resizable sequence
Outputs
None
Word description
Resizes the sequence to zero length, removing all elements. Not all sequences are resizable.
Errors
Throws an error if the sequence is not resizable.
Side effects
Modifies
seq
Definition
USING:
kernel
;
IN:
sequences
:
delete-all
( seq -- )
0
swap
set-length
;