Table of Contents

Method OrElse

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

OrElse<T>(Task<Maybe<T>>, Maybe<T>)

Uses a second Maybe<T> when the task gives no value.

public static Task<Maybe<T>> OrElse<T>(this Task<Maybe<T>> a, Maybe<T> b)

Parameters

a Task<Maybe<T>>

The task giving the value to prefer.

b Maybe<T>

Used when the awaited value contains none.

Returns

Task<Maybe<T>>

A task giving the awaited value if it contains one, and b otherwise.

Type Parameters

T

The type of the value, when there is one.