Factor out map-traversal-dispatcher