find-index ( ... seq quot: ( ... elt i -- ... ? ) -- ... i elt )


Vocabulary
sequences

Inputs and outputs
seqa sequence
quota quotation with stack effect ( ... elt i -- ... ? )
ithe index of the first match or f
eltthe first matching element or f


Word description
A varient of find where the quotation takes both an element and its index.

Definition


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