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