https://d.puremagic.com/issues/show_bug.cgi?id=5660
--- Comment #10 from [email protected] 2014-01-07 18:32:09 PST --- I think a "yield" with an usage syntax like this (semantically similar to the Python "yield") that's syntax sugar for a ForwardRange is a good and handy addition to the language: yield(int) foo() { yield 1; yield 2; } void main() { import std.stdio, std.algorithm; foo.map!(x => x).writeln; } See also for an improvement: http://www.python.org/dev/peps/pep-0380/ That explains the desire for also a "yield foreach" (this is not a replacement for "yield", it's an addition): yield(int) bar() { yield foreach foo(); } -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
