On Sunday, 1 July 2018 at 06:55:35 UTC, Robert M. Münch wrote:
The looping needs to be done in the handler because there are two loops running one after the other and the range to loop over is detected in the handler too. Otherwise a lot of code duplication would happen.
Maybe an application for filter? C[] cs = ...; cs.filter!((c) => <predicate to be fulfilled>) .each!((c) => c.a())