Handbook
Glossary
map-filter-as ( ... seq map-quot: ( ... elt -- ... newelt ) filter-quot: ( ... newelt -- ... ? ) exemplar -- ... subseq )
Vocabulary
sequences
.
extras
Inputs
seq
a
sequence
map-quot
an
object
filter-quot
an
object
exemplar
an
object
Outputs
subseq
an
object
Word description
A version of
map-filter
where the resultant sequence has the same class as
exemplar
Definition
USING:
kernel
sequences
sequences.private
;
IN:
sequences.extras
:
map-filter-as
( ... seq map-quot: ( ... elt -- ... newelt ) filter-quot: ( ... newelt -- ... ? ) exemplar -- ... subseq )
reach
length
over
[
(selector-as)
[
compose
each
]
dip
]
2curry
dip
like
;
inline