The behavior of the algorithm is not well described, but the intuitive
expectation would be that it returns for every pair of adjacent elements
that match the predicate the second of the pair. However, the unexpected
behavior of the algorithm is that for a non-empty range it literally always
returns the first element.