code: public static <T> Stream<Indexed<T>> zipWithIndex(Stream<T> source) {
          return zip(indices().mapToObj(Long::valueOf), source, Indexed::index)
                  .onClose(source::close);
      }
docs: Zip the source stream together with the stream of indices() to provide a stream of indexed values.
  @param source  The source stream.
  @param <T> The type over which the source stream streams.
  @return A stream of indexed values.