code: public static <T, R> R reduce(final Iterable<T> iterable, final R initial, final BiFunction<R, ? super T, R> accumulator) {
          checkNotNull(iterable, "reduce must have a non null iterable");
          checkNotNull(accumulator, "reduce must have a non null function");
  
          R returnValue = initial;
          for (T r : iterable) {
              returnValue = accumulator.apply(returnValue, r);
          }
          return returnValue;
      }
docs: Perform a reduction of an iterable, using an initial value, and a two argument function. The function
  is applied to each element using the last result as the first argument and the element as the second.
  
  @param <T>         type of the iterable elements and accumulator's second argument
  @param <R>         type returned by reduce, the accumulator and it's first argument
  @param iterable    the iterable.
  @param initial     the initial value of the first argument.
  @param accumulator the two argument function.
  @return the final result of the function.
  @since 1.5