Operator implicit operator
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
implicit operator Either<T1, T2, T3>(EitherFirst<T1>)
Changes a value marked for the first position into an either of this type.
public static implicit operator Either<T1, T2, T3>(Either.EitherFirst<T1> value)
Parameters
valueEither.EitherFirst<T1>The marked value, as produced by First<T>(T).
Returns
- Either<T1, T2, T3>
An either holding that value as its first case.
Remarks
This is what makes First<T>(T) usable as a replacement
for this type's own First.
implicit operator Either<T1, T2, T3>(EitherSecond<T2>)
Changes a value marked for the second position into an either of this type.
public static implicit operator Either<T1, T2, T3>(Either.EitherSecond<T2> value)
Parameters
valueEither.EitherSecond<T2>The marked value, as produced by Second<T>(T).
Returns
- Either<T1, T2, T3>
An either holding that value as its second case.
Remarks
This is what makes Second<T>(T) usable as a replacement
for this type's own Second.
implicit operator Either<T1, T2, T3>(EitherThird<T3>)
Changes a value marked for the third position into an either of this type.
public static implicit operator Either<T1, T2, T3>(Either.EitherThird<T3> value)
Parameters
valueEither.EitherThird<T3>The marked value, as produced by Third<T>(T).
Returns
- Either<T1, T2, T3>
An either holding that value as its third case.
Remarks
This is what makes Third<T>(T) usable as a replacement
for this type's own Third.