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