https://d.puremagic.com/issues/show_bug.cgi?id=5550
--- Comment #11 from Jakob Ovrum <[email protected]> 2014-01-16 09:32:06 PST --- (In reply to comment #10) > > 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. Review of a PR is probably best done on Github. > 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 Thanks, I'll add it. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
