private static Number reduce(Iterable<Number> source, BinaryFunction f) {
        Iterator<Number> it = source.iterator();
        Number result = it.next();
        while (it.hasNext()) {
            result = f.apply(result, it.next());
        }
        return result;
    }
{@code CollQueryFunctions} defines function implementation for use in ColQueryTemplates

@author tiwe
querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java