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

Prev:assoc-any? ( ... assoc quot: ( ... key value -- ... ? ) -- ... ? )
Next:sift-keys ( assoc -- assoc' )


Vocabulary
assocs

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


Outputs
?a boolean


Word description
Tests if all entries in the assoc satisfy a predicate by applying the quotation to each entry in turn. a predicate quotation to entry in the assoc. Iteration stops if an entry is found for which the quotation outputs f. If the assoc is empty, always outputs t.

Definition


: assoc-all?
( ... assoc quot: ( ... key value -- ... ? ) -- ... ? )
[ not ] compose assoc-any? not ; inline