Models a CSharpx.Maybe when contains a value.
More...
|
bool | MatchJust (out T value) |
| Matches a value returning true and value itself via output parameter.
|
|
bool | MatchNothing () |
| Matches an empty value returning true .
|
|
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.
|
|
| Maybe (MaybeType tag) |
|
Models a CSharpx.Maybe when contains a value.
Definition at line 87 of file Maybe.cs.
◆ Just()
Definition at line 89 of file Maybe.cs.
91 {
93 }
T Value
The wrapped value.
MaybeType
Discriminator for CSharpx.Maybe.
◆ Value
The wrapped value.
Definition at line 98 of file Maybe.cs.
The documentation for this class was generated from the following file:
- deps/commandlineparser/src/CommandLine/Infrastructure/CSharpx/Maybe.cs