Skip to main content

orElseW()

orElseW<E1, E2, B>(onLeft): <A>(ma) => Either<E2, B | A>

Recovers from a Left by applying a function with widened error type.


Type Parametersโ€‹

E1: E1โ€‹

The original error type.

E2: E2โ€‹

The new error type.

B: Bโ€‹

The new success type.


Parametersโ€‹

onLeft: (e) => Either<E2, B>โ€‹

Handler for Left case.


Returns: <A>(ma): Either<E2, B | A>โ€‹

A function that transforms the Either.


Sinceโ€‹

2.0.0