Bug 4954 – Clarify documentation of foreach with delegates.
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-09-28T14:47:00Z
Last change time
2014-09-22T13:13:53Z
Keywords
pull
Assigned to
nobody
Creator
ah08010-d
Comments
Comment #0 by ah08010-d — 2010-09-28T14:47:38Z
The foreach/opApply docs acknowledge that the Aggregate in a foreach statement might be a delegate, but that section needs to be fleshed out with more text and/or an example or two:
~~~~~~~~~~
Foreach over Delegates
If Aggregate is a delegate, the type signature of the delegate is of the same as for opApply. This enables many different named looping strategies to coexist in the same class or struct.
~~~~~~~~~~