== Quote from Daniel Murphy ([email protected])'s article > Andrei Alexandrescu Wrote: > > Gone, that is. Walter agreed to remove it. > > > > To achieve the functionality of > > > > foreach_reverse (r) { ... } > > > > use > > > > foreach (retro(r)) { ... } > > > > using retro in std.range. > > > > > > Andrei > What about where foreach is being done over something other than a range? > eg. > foreach(i; 1..100) > foreach(v; structwithopapply)
In general, now that we've decided to keep opApply, std.range needs to be reworked a little to make it coexist as peacefully as possible with ranges. For this case, I guess retro could simply have an opApply method that forwards to structwithopapply's opApplyReverse method.
