On Sunday, 26 January 2014 at 13:49:34 UTC, bearophile wrote:
Stanislav Blinov:
We need generic enumerate() in Phobos :(It will come soon :-) https://github.com/D-Programming-Language/phobos/pull/1866
Cool!
This also shows we need a good syntax to unpack tuples:
100% agree.
myRange.enumerate.map!(t{i, x} => i % 2 ? -x : x);
Why not just like ((i, x) => i % 2 ? -x : x)? Isn't (a,b,...) how an unpacked tuple should look like?