Handbook
Glossary
remove-eq ( elt seq -- newseq )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Adding and removing sequence elements
Prev:
remove ( elt seq -- newseq )
Next:
remove-nth ( n seq -- seq' )
Vocabulary
sequences
Inputs
elt
an
object
seq
a
sequence
Outputs
newseq
a new sequence
Word description
Outputs a new sequence containing all elements of the input sequence except those equal to the given element.
Notes
This word uses identity comparison (
eq?
).
See also
remove
,
remove-nth
,
remove-eq!
,
remove!
,
remove-nth!
Definition
USING:
kernel
;
IN:
sequences
:
remove-eq
( elt seq -- newseq )
[
eq?
]
with
reject
;