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