code: public static double avg(Array array) throws ExpressionException {
  	if (array.size() == 0) return 0;
  	return sum(array) / array.size();
      }
docs: average of all values of the array, only work when all values are numeric
  
  @param array
  @return average of all values
  @throws ExpressionException