Handbook
Glossary
any? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Sequence combinators
Prev:
product ( seq -- n )
Next:
all? ( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
Vocabulary
sequences
Inputs
seq
a
sequence
quot
a
quotation
with stack effect
( ... elt -- ... ? )
Outputs
?
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
.
See also
all?
,
none?
Definition
USING:
kernel
;
IN:
sequences
:
any?
( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
find
drop
>boolean
;
inline