Method SelectNonempty
SelectNonempty<T, TResult>(IEnumerable<Maybe<T>>, Func<T, Maybe<TResult>>)
Converts an
Declaration
public static IEnumerable<Maybe<TResult>> SelectNonempty<T, TResult>(this IEnumerable<Maybe<T>> source, Func<T, Maybe<TResult>> predicate)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Maybe<T>> | source | The |
| Func<T, Maybe<TResult>> | predicate | A function that converts a {T} value to a Maybe{TResult}. |
Returns
| Type | Description |
|---|---|
| IEnumerable<Maybe<TResult>> | A set of Maybe{TResult} values that excludes any empty values in the source. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of value contained with the Maybe<T> instances in the |
| TResult | The type of value contained in the Maybe<T> instances returned. |
Remarks
If source is null then an empty set is returned.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |