On 9/21/15 6:49 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
In general though, if you want a counter for the
range that you're indexing, then you can use lockstep to wrap the range, and
then when you use it in foreach, you get the count and the element:

http://dlang.org/phobos/std_range.html#.lockstep

As Justin Whear pointed out, enumerate is better when you have one range.

-Steve

Reply via email to