class Int {

    public static long reduceBy( final int[] array, ReduceBy reduceBy ) {


        long sum = 0;
        for ( int v : array ) {
            sum = reduceBy.reduce(sum, v);
        }
        return sum;
    }

}