yuriyoleynikov / YoTennis

Application for Tennis stats.
0 stars 0 forks source link

Enumerable helpers #21

Closed Igorbek closed 7 years ago

Igorbek commented 7 years ago

This task is to implement the following helpers for Enumerable:

internal static class EnumerableExtensions
{
    public static IEnumerable<T> WithElement<T>(this IEnumerable<T> source, T element) { ... }
    public static IEnumerable<T> WithoutElement<T>(this IEnumerable<T> source, T element, IEqualityComparer<T> comparer = null) { ... }
}
Igorbek commented 7 years ago

Usage:

IEnumerable<int> seq = ...
IEnumerable<int> seq = seq.WithElement(10).WithoutElement(1);
Igorbek commented 7 years ago

@yuriyoleynikov task has been updated

Igorbek commented 7 years ago

implemented in #20