Class Either
Assembly: Recore.dll
Syntax
public static class Either
Methods
|
Improve this Doc
View Source
Collapse<T>(Either<T, T>)
Declaration
public static T Collapse<T>(this Either<T, T> either)
Parameters
Type |
Name |
Description |
Either<T, T> |
either |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Lefts<TLeft, TRight>(IEnumerable<Either<TLeft, TRight>>)
Collects all the left-side values from the sequence.
Declaration
public static IEnumerable<TLeft> Lefts<TLeft, TRight>(this IEnumerable<Either<TLeft, TRight>> source)
Parameters
Returns
Type Parameters
Name |
Description |
TLeft |
|
TRight |
|
|
Improve this Doc
View Source
Lift<TLeft, TRight>(Action<TLeft>, Action<TRight>)
Combines two unary actions into a single action taking either of their parameters.
Declaration
public static Action<Either<TLeft, TRight>> Lift<TLeft, TRight>(Action<TLeft> leftAction, Action<TRight> rightAction)
Parameters
Type |
Name |
Description |
Action<TLeft> |
leftAction |
|
Action<TRight> |
rightAction |
|
Returns
Type Parameters
Name |
Description |
TLeft |
|
TRight |
|
|
Improve this Doc
View Source
Lift<TLeft, TRight, TResult>(Func<TLeft, TResult>, Func<TRight, TResult>)
Combines two unary functions with the same return type
into a single function taking either of their parameters.
Declaration
public static Func<Either<TLeft, TRight>, TResult> Lift<TLeft, TRight, TResult>(Func<TLeft, TResult> leftFunc, Func<TRight, TResult> rightFunc)
Parameters
Type |
Name |
Description |
Func<TLeft, TResult> |
leftFunc |
|
Func<TRight, TResult> |
rightFunc |
|
Returns
Type |
Description |
Func<Either<TLeft, TRight>, TResult> |
|
Type Parameters
Name |
Description |
TLeft |
|
TRight |
|
TResult |
|
|
Improve this Doc
View Source
Rights<TLeft, TRight>(IEnumerable<Either<TLeft, TRight>>)
Collects all the right-side values from the sequence.
Declaration
public static IEnumerable<TRight> Rights<TLeft, TRight>(this IEnumerable<Either<TLeft, TRight>> source)
Parameters
Returns
Type Parameters
Name |
Description |
TLeft |
|
TRight |
|