I don't get it. You haven't used map in void context. Also, I'm not convinced that you haven't purposefully
written your code inefficiently just to prove that map
is useful. Why do you have the intermediate grep when
an if in the for loop would do just fine? Sure, copying
lists around is *fairly* cheap, but we come to my
original point: Did you actually take a step back before
designing your code, to ensure that it works best? Or
did you just string map and grep together until it
worked the way you wanted it to?

Iterative development is a style where you write something and then modify it in a series of small iterations until it does what you want.

Which means that he did indeed string maps and greps together until it worked the way he wanted to. As part of a deliberate coding style.

I respect that style because it sometimes is mine as well. I've seen it be particularly popular among people who believe in some or all of; test-first development, dynamic programming techniques, and rapid prototyping.

Proponents will claim that it produces more robust code in less development time. They will not claim that it produces the fastest code in the world, but then again there is no need to optimize what is already fast enough...