re: Your "action" loop is normally called mapping, used for either side effects (this is your "action") or "transforming" sequences, see here for an ex...

I agree. Those operations have better names and are part of larger use-cases or patterns.
The problem with those better names is that for beginners, they mean nothing. If you go to a beginner, who never ever coded before, and tell them to "reduce" an array, they will just stare at you wide-eyed.

The C++ <algorithm> header is also a great source for such operations. But again - too advanced.

code of conduct - report abuse