class Result {

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

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

}