/// <summary>
 /// Get one of each repeated element.
 /// </summary>
 public static IDistinctEnumerable <T> GetDistinctRepeatedElements <T>(this IEnumerable <T> enumerable, IEqualityComparer <T> equalityComparer)
 {
     return(enumerable
            .GetRepeatedElements(equalityComparer)
            .ToDistinct(equalityComparer)); // No repeats among the non-distinct elements.
 }