I wonder if there is any way to apply `f` fewer times. Not a huge deal though. Bigger one is that both of these should both use `Utils.cmp` which is uncurried and returns the integer values directly.