core / pragma / failureOrElse /
failureOrElse #
inline fun <TNewFailure, TSuccess, TFailure : TNewFailure> PragmaResult<TSuccess, TFailure>.failureOrElse(onFailure: (TSuccess) -> TFailure): TFailure
Returns the encapsulated value if this instance represents failure or the result of onFailure function for the encapsulated TSuccess if it is success.