flatMap<R> method

Try<R, ResourceException> flatMap<R>(
  1. Try<R, ResourceException> transform(
    1. SuccessT value
    )
)
inherited

Implementation

Try<R, Failure> flatMap<R>(
    Try<R, Failure> Function(Success value) transform) {
  if (isSuccess) {
    return transform(getOrThrow());
  } else {
    return Try.failure(exceptionOrNull());
  }
}