any? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
Factor handbook > The language > Collections > Sequence operations > Sequence combinators

Prev:produce-as ( ..a pred: ( ..a -- ..b ? ) quot: ( ..b -- ..a obj ) exemplar -- ..b seq )
Next:all? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )


Vocabulary
sequences

Inputs and outputs
seqa sequence
quota quotation with stack effect ( ... elt -- ... ? )
?a boolean


Word description
Tests if the sequence contains an element satisfying the predicate, by applying the predicate to each element in turn until a true value is found. If the sequence is empty or if the end of the sequence is reached, outputs f.

Definition


: any? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
find drop >boolean ; inline