Simplify ranges and iteration logic in abc::map