sum returns the sum of values of expr.