![]() | duplicatesDuplicatesSortedT Method |
Namespace: WhetStone.Looping
public static IEnumerable<T> DuplicatesSorted<T>( this IEnumerable<T> arr, IEqualityComparer<T> comp = null, int minoccurances = 2 )
arr doesn't have to be sorted, it just has to have all elements equal to each other adjacent.
Alternately, all non-adjacent equal elements will be treated as non-equal.