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. ~~~~~~~~~~
Comment #1 by hsteoh — 2014-09-19T21:28:09Z
Wow this bug is old. About time somebody did something about it!! https://github.com/D-Programming-Language/dlang.org/pull/658
Comment #2 by github-bugzilla — 2014-09-22T13:13:45Z
Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/58087a37bd3129ff11c5c2d85c6b6891bcd878ed Merge pull request #658 from quickfur/issue4954 Add code example for foreach over delegate.