On Tuesday, 5 November 2013 at 17:14:23 UTC, safety0ff wrote:
One other gotcha that I've run into is trying to use foreach on a range of tuples with an iteration index. It does not do what you might expect, try:import std.range, std.stdio; void main() { auto a = repeat(1,5); auto b = repeat(2,5); foreach(i, ab; a.zip(b)) writeln(i, " ", ab); }See bugzilla #5550 for bearophile's range.enumerate enhancement request.
Also this: http://d.puremagic.com/issues/show_bug.cgi?id=10765