filter-map-as ( ... seq filter-quot: ( ..a elt -- ..b ? ) map-quot: ( obj -- obj' ) exemplar -- ... newseq )


Vocabulary
sequences.extras

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


Outputs
newseqa sequence


Word description
Filter the given sequence with filter-quot, then perform a map on the filtered sequence with map-quot. Outputs a sequence of the same class as exemplar.

Definition


: filter-map-as
( ... seq filter-quot: ( ..a elt -- ..b ? ) map-quot: ( obj -- obj' ) exemplar -- ... newseq )
reach length over [ 1filter-mapper-for [ each ] dip ] 2curry
dip like ; inline