Luna::List::unique
template <typename _BinaryPredicate>
usize unique(_BinaryPredicate p)
Removes all consecutive duplicate elements from the container.
Only the first element in each group of equal elements is left. Elements are compared using the user-provided binary predicate.
Parameters
-
in p
The binary predicate which returns
​trueif two elements are equal.
Return value
Returns the number of elements removed.
Valid Usage
pmust provide the following function:bool operator()(const _Ty& a, const _Ty& b), that returnstrueifaandbis equal.