code: public static <T> T[] each(T[] self, @ClosureParams(FirstParam.Component.class) Closure closure) {
          for(T item : self){
              closure.call(item);
          }
          return self;
      }
docs: Iterates through an array passing each array entry to the given closure.
  <pre class="groovyTestCase">
  String[] letters = ['a', 'b', 'c']
  String result = ''
  letters.each{ result += it }
  assert result == 'abc'
  </pre>
  
  @param self    the array over which we iterate
  @param closure the closure applied on each array entry
  @return the self array
  @since 2.5.0