Range : in `compare` merge nested ifs