foreach_reverse is better than ever

dsimcha dsimcha at yahoo.com
Sun Feb 14 06:48:23 PST 2010


== Quote from Lars T. Kyllingstad (public at kyllingen.NOSPAMnet)'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.
> Let me first say that I think it's great that one of D's ugliest
> keywords is going away. But does retro (or ranges in general) support
> iteration over both index and element?
>    foreach_reverse(i, e; foo) { ... }
> -Lars

Bug 3519:  http://d.puremagic.com/issues/show_bug.cgi?id=3519



More information about the Digitalmars-d mailing list