"iterate" is a bad concept for 95% of use cases; it requires thinking about "steps" and aggregators and side-effects. List Comprehensions are usually much better, with the idea being "give me a collection of stuff, and I'll give you some other collection back." Many languages now have these as foreach (instead of for), map, and filter. Only on special occasions does an algorithm actually require consideration of each step in context of the other steps.