The Maybe type models an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing).
More...
|
static Maybe< T > | Nothing< T > () |
| Builds the empty case of CSharpx.Maybe.
|
|
static Just< T > | Just< T > (T value) |
| Builds the case when CSharpx.Maybe contains a value.
|
|
static Maybe< T > | Return< T > (T value) |
| Inject a value into the monadic CSharpx.Maybe<T> type.
|
|
static Maybe< T2 > | Bind< T1, T2 > (Maybe< T1 > maybe, Func< T1, Maybe< T2 > > func) |
| Sequentially compose two actions, passing any value produced by the first as an argument to the second.
|
|
static Maybe< T2 > | Map< T1, T2 > (Maybe< T1 > maybe, Func< T1, T2 > func) |
| Transforms an maybe value by using a specified mapping function.
|
|
static Maybe< Tuple< T1, T2 > > | Merge< T1, T2 > (Maybe< T1 > first, Maybe< T2 > second) |
| If both maybes contain a value, it merges them into a maybe with a tupled value.
|
|
static Maybe< TRight > | FromEither< TLeft, TRight > (Either< TLeft, TRight > either) |
| Maps Either Right value to Maybe Just, otherwise Maybe Nothing.
|
|
The Maybe type models an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing).
Provides static methods for manipulating CSharpx.Maybe.
Definition at line 32 of file Maybe.cs.