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