code: public static <E> Iterator<E> mutableIndexIterator(IntPredicate hasNext,
                                                       IntFunction<E> next,
                                                       IntConsumer remove) {
      Objects.requireNonNull(hasNext, "hasNext");
      Objects.requireNonNull(next, "next");
      Objects.requireNonNull(remove, "remove");
  
      class MutableIndexIterator extends MutableIterator<E> {
        private int index;
  
        @Override
        public boolean hasNext() {
          return hasNext.test(index);
        }
  
        @Override
        protected E nextElement() {
          return next.apply(index++);
        }
  
        @Override
        protected void removeElement() {
          remove.accept(index - 1);
        }
      }
  
      return new MutableIndexIterator();
    }
docs: As {@link #indexIterator(java.util.function.IntPredicate, java.util.function.IntFunction)}
  except with a remove method.
  
  @param hasNext used to implement {@link java.util.Iterator#hasNext()}
  @param next used to implement {@link java.util.Iterator#next()}
  @param remove used to implement {@link java.util.Iterator#remove()}
  @param <E> the generic type
  @return a new instance