|
| bool | MatchLeft (out TLeft value) |
| |
| bool | MatchRight (out TRight value) |
| |
| static Either< TLeft, TResult > | Map< TLeft, TRight, TResult > (Either< TLeft, TRight > either, Func< TRight, TResult > func) |
| | Transforms a Either's right value by using a specified mapping function.
|
| |
| static Either< TLeft1, TRight1 > | Bimap< TLeft, TRight, TLeft1, TRight1 > (Either< TLeft, TRight > either, Func< TLeft, TLeft1 > mapLeft, Func< TRight, TRight1 > mapRight) |
| | Maps both parts of a Either type. Applies the first function if Either is Left. Otherwise applies the second function.
|
| |
| static TRight | GetOrFail< TLeft, TRight > (Either< TLeft, TRight > either) |
| | Returns a Either Right or fail with an exception.
|
| |
| static TLeft | GetLeftOrDefault< TLeft, TRight > (Either< TLeft, TRight > either, TLeft @default) |
| | Returns a Either Left or a defualt value.
|
| |
| static TRight | GetRightOrDefault< TLeft, TRight > (Either< TLeft, TRight > either, TRight @default) |
| | Returns a Either Right or a defualt value.
|
| |
| static Either< Exception, TRight > | Try< TRight > (Func< TRight > func) |
| | Wraps a function, encapsulates any exception thrown within to a Either.
|
| |
| static Either< Exception, TRight > | Cast< TRight > (object obj) |
| | Attempts to cast an object. Stores the cast value in 1Of2 if successful, otherwise stores the exception in 2Of2.
|
| |
| static Either< TLeft, TRight > | FromMaybe< TLeft, TRight > (Maybe< TRight > maybe, TLeft left) |
| |
| static Either< TLeft, TRight > | Left< TLeft, TRight > (TLeft value) |
| |
| static Either< TLeft, TRight > | Right< TLeft, TRight > (TRight value) |
| |
| static Either< string, TRight > | Return< TRight > (TRight value) |
| | Inject a value into the Either type, returning Right case.
|
| |
| static Either< string, TRight > | Fail< TRight > (string message) |
| | Fail with a message. Not part of mathematical definition of a monad.
|
| |
| static Either< TLeft, TResult > | Bind< TLeft, TRight, TResult > (Either< TLeft, TRight > either, Func< TRight, Either< TLeft, TResult > > func) |
| | Monadic bind.
|
| |
| static Either< TLeft, TResult > | Select< TLeft, TRight, TResult > (this Either< TLeft, TRight > either, Func< TRight, TResult > selector) |
| | Map operation compatible with Linq.
|
| |
| static Either< TLeft, TResult > | SelectMany< TLeft, TRight, TResult > (this Either< TLeft, TRight > result, Func< TRight, Either< TLeft, TResult > > func) |
| |
| | Either (EitherType tag) |
| |
Definition at line 74 of file Either.cs.