static <T> Seq<Tuple2<T, Long>> zipWithIndex(Seq<? extends T> stream) {
        long[] index = { -1L };

        return SeqUtils.transform(stream, (delegate, action) ->
            delegate.tryAdvance(t ->
                action.accept(tuple(t, ++index[0]))
            )
        );
    }
Zip a Stream with a corresponding Stream of indexes.
<p>
<pre><code>
// (tuple("a", 0), tuple("b", 1), tuple("c", 2))
Seq.of("a", "b", "c").zipWithIndex()
</code></pre>
jOOL/src/main/java/org/jooq/lambda/Seq.java