Skip to main content

mapBoth()

const mapBoth: <E, G, A, B>(f, g) => (fa) => TaskEither<G, B> = bimap

Alias for bimap.

Maps functions over both Left and Right values.


Type Parametersโ€‹

E: Eโ€‹

The original error type.

G: G extends ErrorTypeโ€‹

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 TaskEither.


Sinceโ€‹

2.0.0