Sun, 18 Jan 2009 07:21:55 -0800, Andrei Alexandrescu wrote: > http://www.digitalmars.com/d/2.0/statement.html#ForeachStatement > > Scroll down to "Foreach over Structs and Classes with Ranges". The > changelog reflects that too:
How do I implement a range that supports more than one pass? From the
docs, all ranges seem to be essentially Input ranges currently. That is
MyIterable collection;
foreach (element; collection) {} // OK, iterates
foreach (element; collection) {} // oops, it's empty!
