Structural comparison in Standard ML
问题 I can't seem to find reference on why does this not work: - (2000,1)<(2000,1); stdIn:18.1-18.18 Error: operator and operand don't agree [overload] operator domain: 'Z * 'Z operand: (int * int) * (int * int) in expression: (2000,1) < (2000,1) Does Standard ML support structural comparison? 回答1: The short answer: Only for equality. The strictly less than operator (<) in the top level environment is as the other comparison operators a bit "special". They are "special" in the way that they are