IMHO, if the program logic is essentially to loop over some steps, it had better be written in the form of a loop over some steps.
Just, if possible, please make sure it is easy to find out how the map() is actually implemented (like please don't hide it deep in a language runtime).