When you are writing a sort comparison function (say, to be passed to
or *gasp* to be used as
an ), your comparison function needs to follow
has the opposite sign of
, where 0 is considered to
be its own opposite.
Here are some logical consequences of these rules...