private static <T> double sum0(List<T> list, ToDoubleFunction<? super T> function) {
        double result = 0.0;

        for (T t : list)
            result += function.applyAsDouble(t);

        return result;
    }
Get a {@link Collector} that calculates the <code>regrR2Double()</code> function.
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java