Method MapSecond
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
MapSecond<T>(Func<T2, T>)
Transforms the value if this holds the second case, and passes each other case through unchanged.
public Either<T1, T, T3> MapSecond<T>(Func<T2, T> f)
Parameters
fFunc<T2, T>The function to transform the second case with.
Returns
- Either<T1, T, T3>
An either whose second case has type
T. It holds the result offif this held the second case, and otherwise the same case and value as this.
Type Parameters
TThe type that the second case becomes.
Remarks
This calls f only when this holds the second case.