Class type with `min`?
Given the Ord
Type Class:
Prelude> :i Ord
class Eq a => Ord a where
compare :: a -> a -> Ordering
(<) :: a -> a -> Bool
(<=) :: a -> a -> Bool
(>) :: a -> a -> Bool
(>=) :: a -> a -> Bool
max :: a -> a -> a
min :: a -> a -> a
Is there a type class that provides a field / function min : a
for a given type?
Example:
min :: Int
displays the minimum value Int
.
+3
source to share