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

Prev:assoc-map ( ... assoc quot: ( ... key value -- ... newkey newvalue ) -- ... newassoc )
Next:assoc-filter-as ( ... assoc quot: ( ... key value -- ... ? ) exemplar -- ... subassoc )


Vocabulary
assocs

Inputs and outputs
assocan assoc
quota quotation with stack effect ( ... key value -- ... ? )
subassoca new assoc


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

See also
assoc-filter-as, assoc-filter!

Definition


: assoc-filter
( ... assoc quot: ( ... key value -- ... ? ) -- ... subassoc )
over assoc-filter-as ; inline