Dominic: unify continuous and discontinuous intervals under a single interface