Refactor Maps.forEach()