Hot off the press and VERY prototype-ish:
Code:
http://pastebin.com/m2087e524
Docs:
http://cis.jhu.edu/~dsimcha/unpackEnumerate.html
Does this look like a good addition to std.range? The elegance of it is it solves
the problem of providing syntactic sugar to ranges w/ zero ripple effects either
in the compiler or in the rest of Phobos. I'll file it somewhere more official
after people review it a little and refine the idea, but I definitely think
something similar to this has a legit place in std.range.
If you're wondering how unpack works and don't want to grovel through all the
code, it's tons of string mixin magic. That's about the only way I was able to
make it work.