foreachThe important part is this:
When you see the colon ":" read it as “in”.
Applying this to the example:
1
| for(Pixel p: panel.pixels) |
...should be read as...
for each(Pixel p in panel.pixels)
I personally hated it at first, but now I've come to like it.
My only gripe with it is the occasional problem it causes when bodging new functionality into old code.
You'll sometimes find you need access to the Iterator or the iteration index and have to re-factor the loop construct - which can be a bit of a faff.