Handbook
Glossary
2filter-as ( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... newelt ) exemplar -- ... newseq )
Vocabulary
sequences
.
extras
Inputs
seq1
an
object
seq2
an
object
quot
a
quotation
with stack effect
( ... elt1 elt2 -- ... newelt )
exemplar
an
object
Outputs
newseq
an
object
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
2filter-as
( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... newelt ) exemplar -- ... newseq )
[
pick
[
length
]
keep
[
(2selector-as)
[
2each
]
dip
]
2curry
call
]
dip
like
;
inline