findAdjacent

fnRange findAdjacent(alias pred = "a == b", Range)(Range r) if (isForwardRange!(Range))

Advances r until it finds the first two adjacent elements a, b that satisfy pred(a, b). Performs r.length evaluations of pred.

For more information about pred see find.

Parameters

predThe predicate to satisfy.
rA forward range to search in.

Returns

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.

See Also