Vocabulary
sequences

Inputs
na starting index
seqa sequence
quota quotation with stack effect ( ... elt -- ... ? )


Outputs
ithe index of the first match or f
eltthe first matching element or f


Word description
Applies the quotation to each element of the sequence in turn, until it outputs a true value or the end of the sequence is reached. If the quotation yields a true value for some sequence element, the word outputs the element index and the element itself. Otherwise, the word outputs an index of f and f as the element.

See also
find, find-last, find-last-from, search

Definition


: find-from
( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt )
[ (find-integer) ] (find-from) ; inline