"how to do an inverse `range`, i.e. create a compact range based on a set of numbers?","[1, 1, 2, 2]"