getOrElse()
getOrElse<
E,A>(onLeft): (ma) =>A
Extracts the value from a Right or applies a function to the Left.
Type Parametersโ
E: Eโ
The error type.
A: Aโ
The success type.
Parametersโ
onLeft: (e) => Aโ
Handler for Left case.
Returnsโ
A function that takes an Either and returns A.
Sinceโ
2.0.0