foreach_reverse is better than ever
Michel Fortin
michel.fortin at michelf.com
Sun Feb 14 04:51:41 PST 2010
On 2010-02-14 07:15:55 -0500, bearophile <bearophileHUGS at lycos.com> said:
> The first can be done turning an interval into syntax sugar for iota(1,100):
> The foreach(i; retro(1 .. 100))
I'm all for it, but we'll need to have 1..100 mapped to a new interval
type for this to work. Then you can easily implement this (among many
other interesting things):
auto reverse(Interval!int interval) { ... }
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list