comparable :: PartialOrd a => a -> a -> Bool
comparable x y = leq x y || leq y x
either as a standalone function or a class method on PartialOrd with default implementation as above? Only reason I suggest a class method is so that instances could improve performance a touch, but it's possibly only a minor benefit.
Happy to send over a pull request for preferred approach.
Could we add
either as a standalone function or a class method on
PartialOrd
with default implementation as above? Only reason I suggest a class method is so that instances could improve performance a touch, but it's possibly only a minor benefit.Happy to send over a pull request for preferred approach.