@Override
        public String toString() {
            if (argumentNames.size() == 0) return "1";
            if (argumentNames.size() == 1) return "1";
            if (argumentNames.size() == 2) return argumentNames.get(0) + "==" + argumentNames.get(1);

            StringBuilder b = new StringBuilder();
            for (int i = 0; i < argumentNames.size() -1; i++) {
                b.append("(").append(argumentNames.get(i)).append("==").append(argumentNames.get(i+1)).append(")");
                if ( i < argumentNames.size() -2)
                    b.append("*");
            }
            return b.toString();
        }
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