Function argument type that must be comparable

question

#1

Is there a way to force the type of an argument in a function to be comparable?

It is not a huge problem as if the isless (or <) method is not available, it will raise an error. But I would rather enforce the type of the argument to be comparable.


#2

It is impossible to do this in dispatch. You can check it in the function with applicable though that’s usually not needed and unreliable.