Removing multiple elements from array
Ali Çehreli
acehreli at yahoo.com
Sat Dec 21 20:06:00 PST 2013
On 12/21/2013 05:39 PM, aldanor wrote:
> On Saturday, 21 December 2013 at 21:49:01 UTC, MrSmith wrote:
>> just use foreach_reverse
>
> Wow, I never knew it is a keyword, thank you!
I feel guilty for omitting in knowingly but we've been hearing that it
would be deprecated. I don't think it will ever happen. :-/
Besides, I think retro(), its alternative, is not suitable for recursive
algorithms because retro() works only with ranges.
I had once tried to do recursive iteration with ranges (probably on a
tree) but it had turned out that iteration with opApplyReverse was more
natural for recursion. (I may be wrong on my conclusion but that is what
I remember now.)
Ali
More information about the Digitalmars-d-learn
mailing list