Support for all types of ranges

We can't change Range like this because of ABI stability.

We have, however, previously discussed adding something like a PredicateSet (as well as other kinds of Set). Perhaps something like that would be a better way to solve your problem?