code: public static <E> Iterator<E> tap(Iterator<E> iterator, Consumer<E> consumer) {
          return new TransformingIterator<E, E>(iterator, new Tapper<E>(consumer));
      }
docs: Creates an iterator yielding each element of the source iterator after
  applying the passed consumer. This application is evaluated lazily when the
  resulting iterator is consumed. E.g:
  <code>
  tap([1,2,3], sideEffect) -> [1, 2, 3]
  </code>
  
  @param <E> the element type parameter
  @param iterator the iterator
  @param consumer the consumer to be applied
  @return an iterator that when consumed applies a side effect to every
  element