binding function for Array.prototype.findIndex.