>>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6] [1,2,6]
>>> nubBy (/=) [2, 7, 1, 8, 2, 8, 1, 8, 2, 8] [2,2,2]
>>> nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] [1,2,3,5,5]
isSortedBy pred (nubBy pred xs) == TrueThis is true for all lists, not just ordered lists, and all binary predicates, not just total orders. On infinite lists, this statement is true in a certain mathematical sense, but not a computational one.