On Sunday, 1 July 2018 at 06:55:35 UTC, Robert M. Münch wrote:
On 2018-06-30 22:53:47 +0000, Jerry said:Btw this is pretty much std.algorithm.each import std.algorithm; void main() { auto cs = [ new C(), new C() ]; cs.each!(o => o.A()); } https://dlang.org/phobos/std_algorithm_iteration.html#.eachThe looping needs to be done in the handler because there are two loops running one after the other
Look at my solution then: https://forum.dlang.org/post/[email protected]
and the range to loop over is detected in the handler too. Otherwise a lot of code duplication would happen.
