Passing an explicit comparison function/object would work in ML too, but I left it out of the list of possibilities because it's not as type-safe a solution, and I wanted to compare maximally safe solutions in both languages.

Eg, two priority queues with different ordering schemes would have the same signature, which means that it's possible to (for example) incorrectly merge two queues with different ordering schemes. If each kind of ordering is a queue with a different type, then this error can get caught at compile-time. With the signature I outlined it's not a big deal, but for things like a Set class (which have union and intersection methods) it becomes a more significant problem.