fix: remove duplicate Choose extension

This commit is contained in:
Kyle Ratti 2023-08-02 20:24:09 -04:00
parent 9032294964
commit 5a2bd690f7
No known key found for this signature in database
GPG Key ID: 067C5D2D7C62E0F8

View File

@ -27,10 +27,4 @@ public static class MaybeExtensions
public static T? ToNullable<T>(this Maybe<T> item) where T : struct =>
item.HasValue ? item.Value : null;
public static IEnumerable<TOutput> Choose<TInput, TOutput>(this IEnumerable<TInput> enumerable, Func<TInput, Maybe<TOutput>> mapper) =>
enumerable
.Select(mapper)
.Where(x => x.HasValue)
.Select(x => x.Value);
}