recover abstract method

Success<T> recover(
  1. T onRecover(
    1. ErrorMessage errorMessage
    )
)

Recovers from a failure by providing a new value.

onRecover is the function that provides a new value in case the result is a failure.

Implementation

Success<T> recover(T Function(ErrorMessage errorMessage) onRecover);