code: @SuppressWarnings("unchecked")
      public <U> List<U> scanRight(U seed, BiFunction<? super T, U, U> accumulator) {
          return toListAndThen(list -> {
              // Reusing the list for different object type as it will save memory
              List<U> result = (List<U>) list;
              result.add(seed);
              for (int i = result.size() - 2; i >= 0; i--) {
                  result.set(i, accumulator.apply((T) result.get(i), result.get(i + 1)));
              }
              return result;
          });
      }
docs: Produces a list containing cumulative results of applying the
  accumulation function going right to left using given seed value.
  
  <p>
  This is a terminal operation.
  
  <p>
  The resulting {@link List} is guaranteed to be mutable.
  
  <p>
  For parallel stream it's not guaranteed that accumulator will always be
  executed in the same thread.
  
  <p>
  This method cannot take all the advantages of parallel streams as it must
  process elements strictly right to left.
  
  @param <U> The type of the result
  @param seed the starting value
  @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 {@code List} where the last element is the seed and every
  predecessor element is the result of applying accumulator
  function to the corresponding stream element and the next list
  element. The resulting list is one element longer than this
  stream.
  @see #scanLeft(Object, BiFunction)
  @see #foldRight(Object, BiFunction)
  @since 0.2.2