map-filter-as ( ... seq map-quot: ( ... elt -- ... newelt ) filter-quot: ( ... newelt -- ... ? ) exemplar -- ... subseq )


Vocabulary
sequences.extras

Inputs
seqa sequence
map-quotan object
filter-quotan object
exemplaran object


Outputs
subseqan object


Word description
A version of map-filter where the resultant sequence has the same class as exemplar

Definition


: 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