class Result {

  @NonNull
  public <U> Result<U> ifSucceededAttemptMap(
      @NonNull final Function<? super T, Result<U>> attemptFunction) {
    if (value != null) {
      return attemptFunction.apply(value);
    }
    return sameFailure();
  }

    Result(@Nullable final T value, @Nullable final Throwable failure);

}