Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
harvest ( seq -- newseq )
Vocabulary
sequences
Inputs and outputs
seq
a
sequence
newseq
a
sequence
Word description
Outputs a new sequence with all empty sequences removed.
Examples
USING: prettyprint sequences ; { { } { 2 3 } { 5 } { } } harvest .
{ { 2 3 } { 5 } }
See also
filter
,
filter!
,
sift
Definition
USING:
kernel
;
IN:
sequences
:
harvest
( seq -- newseq )
[
empty?
not
]
filter
;