Logic bug

If compare is a function which returns `-1`, `0` or `1`, then `1-compare()` has a result domain of `2`, `1`, `0`, which is wrong. I did not hit this bug, just encountered it while reading the source