function findLastMonotonous(array, predicate) {
    const idx = findLastIdxMonotonous(array, predicate);
    return idx === -1 ? undefined : array[idx];
}
Finds the last item where predicate is true using binary search.
`predicate` must be monotonous, i.e. `arr.map(predicate)` must be like `[true, ..., true, false, ..., false]`!

@returns `undefined` if no item matches, otherwise the last item that matches the predicate.