Foreach Closures?

Kevin Cox kevincox.ca at gmail.com
Sun Apr 8 16:26:40 PDT 2012


I was wondering about the foreach statement and when you implement
opApply() for a class it is implemented using closures.  I was wondering if
this is just how it is expressed or if it is actually syntatic sugar.  The
reason I aski is because if you have a return statement inside a foreach it
returns from the outside function not the "closure".

I was just wondering if anyone could spill the implementation details.

Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120408/4e1599c8/attachment.html>


More information about the Digitalmars-d mailing list