The predicate to satisfy.
A forward range to search in.
r advanced to the first occurrence of two adjacent elements that satisfy the given predicate. If there are no such two elements, returns r advanced until empty.
int[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ]; auto r = findAdjacent(a); assert(r == [ 10, 10, 9, 8, 8, 7, 8, 9 ]); auto p = findAdjacent!("a < b")(a); assert(p == [ 7, 8, 9 ]);
Advances r until it finds the first two adjacent elements a, b that satisfy pred(a, b). Performs O(r.length) evaluations of pred.
For more information about pred see find.