Ord β ordered types
class (Eq a) => Ord a where
(<), (<=), (>), (>=) :: a -> a -> Bool
min, max :: a -> a -> amin x y
| x <= y = x
| otherwise = y
max x y
| x <= y = y
| otherwise = xclass (Eq a) => Ord a where
(<), (<=), (>), (>=) :: a -> a -> Bool
min, max :: a -> a -> a
-- Minimal complete definition:
-- (<=)
x < y = x <= y && x /= y
x > y = y < x
x >= y = y <= x
min x y
| x <= y = x
| otherwise = y
max x y
| x <= y = y
| otherwise = xLast updated