Skip to main content

getOrElseW()

getOrElseW<E, B>(onLeft): <A>(ma) => B | A

Extracts the value from a Right or applies a function to the Left with widened return type.


Type Parametersโ€‹

E: Eโ€‹

The error type.

B: Bโ€‹

The fallback return type.


Parametersโ€‹

onLeft: (e) => Bโ€‹

Handler for Left case.


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

A function that takes an Either and returns A or B.


Sinceโ€‹

2.0.0