Skip to main content

chain()

const chain: <A, E2, B>(f) => <E1>(ma) => TaskEither<E2 | E1, B> = flatMap

Alias for flatMap.

Chains a function that returns a TaskEither over the Right value.


Type Parametersโ€‹

A: Aโ€‹

The input type.

E2: E2โ€‹

The new error type.

B: Bโ€‹

The output type.


Parametersโ€‹

f: (a) => TaskEither<E2, B>โ€‹

The chaining function.


Returns: <E1>(ma): TaskEither<E2 | E1, B>โ€‹

A function that transforms the TaskEither.


Sinceโ€‹

2.0.0