in reply to Re^4: Improve foreach with help of map?
in thread Improve foreach with help of map?

I just gave basically the same solution. The difference it that mine works ;) You'll need two fixes to make yours work: