public static <T> Collector<T, ?, Optional<Double>> correlationDouble(ToDoubleFunction<? super T> functionX, ToDoubleFunction<? super T> functionY) {
        return collectingAndThen(
            collectors(
                covarianceDouble(functionX, functionY),
                stddevDouble(functionX),
                stddevDouble(functionY)
            ),
            t -> mapAll(t, (v1, v2, v3) -> v2 == 0.0 || v3 == 0.0 ? null : v1 / (v2 * v3))
        );
    }
Get a {@link Collector} that calculates the <code>CORR()</code> function.
jOOL/src/main/java/org/jooq/lambda/Agg.java