Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
remove ( elt seq -- newseq )
Factor documentation
>
Factor handbook
>
The language
>
Collections
>
Sequence operations
>
Adding and removing sequence elements
Prev:
insert-nth ( elt n seq -- seq' )
Next:
remove-eq ( elt seq -- newseq )
Vocabulary
sequences
Inputs and outputs
elt
an
object
seq
a
sequence
newseq
a new sequence
Word description
Outputs a new sequence containing all elements of the input sequence except for given element.
Notes
This word uses equality comparison (
=
).
See also
remove-nth
,
remove-eq
,
remove-eq!
,
remove!
,
remove-nth!
Definition
USING:
kernel
;
IN:
sequences
:
remove
( elt seq -- newseq )
[
=
not
]
with
filter
;