bimap()
bimap<
E,G,A,B>(f,g): (fa) =>Either<G,B>
Maps functions over both Left and Right values of an Either.
Type Parametersβ
E: Eβ
The original error type.
G: Gβ
The new error type.
A: Aβ
The original success type.
B: Bβ
The new success type.
Parametersβ
f: (e) => Gβ
The error mapping function.
g: (a) => Bβ
The success mapping function.
Returnsβ
A function that transforms the Either.
Sinceβ
2.0.0