code: public static <T, V extends T> T inject(Object self, Closure<V> closure) {
          Iterator iter = InvokerHelper.asIterator(self);
          if( !iter.hasNext() ) {
              throw new NoSuchElementException( "Cannot call inject() over an empty iterable without passing an initial value." ) ;
          }
          Object initialValue = iter.next() ;
          return (T) inject(iter, initialValue, closure);
      }
docs: Iterates through the given Object, passing in the first value to
  the closure along with the first item. The result is passed back (injected) into
  the closure along with the second item. The new result is injected back into
  the closure along with the third item and so on until further iteration of
  the object is not possible. Also known as foldLeft in functional parlance.
  
  @param self         an Object
  @param closure      a closure
  @return the result of the last closure call
  @throws NoSuchElementException if the collection is empty.
  @see #inject(Collection, Object, Closure)
  @since 1.8.7