foreach_reverse is better than ever
Jonathan M Davis
jmdavisProg at gmail.com
Sun Feb 14 00:14:44 PST 2010
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
I assume that this was to get rid of a keyword and reduce duplicate
functionality.
Though I must say that I find retro to be a bit funny. I would have expected
it to be reverse. It would be clearer, I think, but it's not like it's hard
to find out what retro does and remember it.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list