Add code example for foreach over delegate.

Fixes: https://issues.dlang.org/show_bug.cgi?id=4954