consecutively unique elements in the original range. If r is also a forward range or bidirectional range, the returned range will be likewise.
uniq
fn
auto uniq(alias pred = "a == b", Range)(Range r) if (isInputRange!Range && is(typeof(binaryFun!pred(r.front, r.front)) == bool))Lazily iterates unique consecutive elements of the given range, which is assumed to be sorted (functionality akin to the
_uniq systemutility). Equivalence of elements is assessed by using the predicate pred, by default "a == b". The predicate is passed to
binaryFun, and can either accept a string, or any callable
that can be executed via pred(element, element). If the given range is bidirectional, uniq also yields a
Parameters
pred | Predicate for determining equivalence between range elements. |
r | An input range of elements to filter. |
Returns
An input range of