@Override
        public Double apply(List<Long> values) {
            long sum = 0;
            for (Long value : values)
                sum += value;
            return (double)sum;
        }
Factory of scalar Java functions.
The purpose of this is to embellish anonymous functions with a runtime type
such that they can be inspected and will return a parsable toString.

@author bratseth
vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java