Stream.with_index/2

defmodule Stream do
  def with_index(stream, offset \\ 0)
end

Creates a stream where each element in the enumerable will be wrapped in a tuple alongside its index.

If offset is given, we will index from the given offset instead of from zero.