Inputs and outputs
seqa sequence
quota quotation with stack effect ( ... elt -- ... result/f )
resultthe first non-false result of the quotation
eltthe first matching element or f

Word description
Applies the quotation to each element of the sequence, until the quotation outputs a true value. If the quotation ever yields a result which is not f, then the value is output, along with the element of the sequence which yielded this.


: map-find
( ... seq quot: ( ... elt -- ... result/f ) -- ... result elt )
[ find ] (map-find) ; inline