code: public static List collectNested(Collection self, Closure transform) {
          return (List) collectNested((Iterable) self, new ArrayList(self.size()), transform);
      }
docs: Recursively iterates through this collection transforming each non-Collection value
  into a new value using the closure as a transformer. Returns a potentially nested
  list of transformed values.
  <pre class="groovyTestCase">
  assert [2,[4,6],[8],[]] == [1,[2,3],[4],[]].collectNested { it * 2 }
  </pre>
  
  @param self      a collection
  @param transform the closure used to transform each item of the collection
  @return the resultant collection
  @since 1.8.1