assoc-filter-as ( ... assoc quot: ( ... key value -- ... ? ) exemplar -- ... subassoc )
Factor handbook » The language » Collections » Associative mapping operations » Associative mapping combinators

Prev:assoc-filter ( ... assoc quot: ( ... key value -- ... ? ) -- ... subassoc )
Next:assoc-reject ( ... assoc quot: ( ... key value -- ... ? ) -- ... subassoc )


Vocabulary
assocs

Inputs
assocan assoc
quota quotation with stack effect ( ... key value -- ... ? )
exemplaran assoc


Outputs
subassoca new assoc


Word description
Outputs an assoc of the same type as exemplar consisting of all entries for which the predicate quotation yields true.

See also
assoc-filter, assoc-filter!

Definition


: assoc-filter-as
( ... assoc quot: ( ... key value -- ... ? ) exemplar -- ... subassoc )
[ (assoc-each) filter ] dip assoc-like ; inline