The law is: prev(t) .map { n => partialOrdering.lteq(n, t) && (!partialOrdering.equiv(t, n)) } .getOrElse(true)
The law is: prev(t) .map { n => partialOrdering.lteq(n, t) && (!partialOrdering.equiv(t, n)) } .getOrElse(true)
Note Ordering extends PartialOrdering, so we are taking a weak constraint that some items can be ordered, and namely, the sequence of items returned by prev is strictly decreasing
This is a typeclass to represent things which are countable down. Note that it is important that a value prev(t) is always less than t. Note that prev returns Option because this class comes with the notion that some items may reach a minimum key, which is None.