in reply to Improve foreach with help of map?

In my opinion, a foreach loop is more appropriate than map in this situation.

Can you provide a compelling reason to use map here? Will your code execute significantly faster? Use much less memory? Be easier to understand and maintain?

I prefer using map for more straightforward applications, such as unconditionally transforming all elements of a list.

Replies are listed 'Best First'.
Re^2: Improve foreach with help of map?
by mickep76 (Beadle) on Oct 09, 2009 at 14:23 UTC
    No compelling reason, more a quest to simplify my code where possible.