code: public static <T> Object sum(T[] self, @ClosureParams(FirstParam.Component.class) Closure closure) {
          return sum(new ArrayIterator<T>(self), null, closure, true);
      }
docs: Sums the result of apply a closure to each item of an array.
  <code>array.sum(closure)</code> is equivalent to:
  <code>array.collect(closure).sum()</code>.
  
  @param self    An array
  @param closure a single parameter closure that returns a numeric value.
  @return The sum of the values returned by applying the closure to each
  item of the array.
  @since 1.7.1