https://d.puremagic.com/issues/show_bug.cgi?id=5550
--- Comment #10 from [email protected] 2014-01-16 08:13:27 PST --- (In reply to comment #9) > Posted a pull request for a library implementation. [...] > > https://github.com/D-Programming-Language/phobos/pull/1866 Seems nice. A comment from the pull request: > This could also be implemented in the language (though > potentially ambiguous with automatic foreach unpacking), > but here's a library solution for review. In some cases I like language-level solutions, but in this case I think the library solution is good enough and safer. Regarding your implementation, I suggest to add an optional "start" argument, as in Python enumerate(): auto data = [10, 20]; foreach (i; x; data.enumerate(3)) write(i, " "); ==> 3 4 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
