enumerate(iter)
is an iterator that yields (i, x) where i is a counter
starting at 1, and x is the i-th value from the given iterator.
How to define
enumerate(iter, start=0)
an iterator that yields (i+start, x) where i is a counter
starting at 1, and x is the i-th value from the given iterator?
More generally, there is Base.Iterators.countfrom(start=1, step=1)
which is an iterator starting at start and incrementing by step.
How to define
enumerate(iter, start=0, step=1)
which is an iterator that yields (i*step+start, x) where i
is a counter starting at 1, and x is the i-th value from the
given iterator?