I’m working with a Belt Map that uses a custom datastructure as it’s key. To do so there was a need to implement a comparable module.
Unfortunately I can’t find out exactly what the expected return values are for cmp.
In particular, I would like to know how I can implement a partial order with only equivalence relations?
My assumption is that when the two arguments are equivalent, then cmp should return 0.
Do the return values -1, and 1 encode smaller than and bigger than relations?
If so, how would I denote the absence of a relation? Or does Comparable only allow for input spaces with a total order?