code: public Optional<T> foldRight(BinaryOperator<T> accumulator) {
          return toListAndThen(list -> {
              if (list.isEmpty())
                  return Optional.empty();
              int i = list.size() - 1;
              T result = list.get(i--);
              for (; i >= 0; i--)
                  result = accumulator.apply(list.get(i), result);
              return Optional.of(result);
          });
      }
docs: Folds the elements of this stream using the provided accumulation
  function, going right to left.
  
  <p>
  This is a terminal operation.
  
  <p>
  As this method must process elements strictly right to left, it cannot
  start processing till all the previous stream stages complete. Also it
  requires intermediate memory to store the whole content of the stream as
  the stream natural order is left to right. If your accumulator function
  is associative, consider using {@link #reduce(BinaryOperator)} method.
  
  <p>
  For parallel stream it's not guaranteed that accumulator will always be
  executed in the same thread.
  
  @param accumulator a <a
  href="package-summary.html#NonInterference">non-interfering </a>,
  <a href="package-summary.html#Statelessness">stateless</a>
  function for incorporating an additional element into a result
  @return the result of the folding
  @see #foldRight(Object, BiFunction)
  @see #foldLeft(BinaryOperator)
  @see #reduce(BinaryOperator)
  @since 0.4.0