code: public static <I extends Iterable<E>, E> Iterator<E> flatten(Iterator<I> iterables) {
          return new ChainIterator<>(new TransformingIterator<>(iterables, Iterable::iterator));
      }
docs: Flattens an iterator of iterables of E to an iterator of E. E.g:
  <code>
  flatten([1,2], [3,4]) -> [1,2,3,4]
  </code>
  
  @param <I> the iterable type
  @param <E> the iterable element type
  @param iterables the iterator of iterables to be flattened
  @return the flattened iterator