Handbook
Glossary
remove! ( elt seq -- seq )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Destructive sequence operations
Prev:
change-nth ( ..a i seq quot: ( ..a elt -- ..b newelt ) -- ..b )
Next:
remove-eq! ( elt seq -- seq )
Vocabulary
sequences
Inputs
elt
an
object
seq
a resizable mutable sequence
Outputs
seq
a resizable mutable sequence
Word description
Removes all elements equal to
elt
from
seq
and returns
seq
.
Notes
The sequence
seq
MUST be growable. See
Resizable sequence implementation
.
Notes
This word uses equality comparison (
=
).
Side effects
Modifies
seq
See also
remove
,
remove-nth
,
remove-eq
,
remove-eq!
,
remove-nth!
Definition
USING:
kernel
;
IN:
sequences
:
remove!
( elt seq -- seq )
[
=
]
with
reject!
;