codesnippets:prelude:basictypeclasses
This is an old revision of the document!
Basic type classes
Eq
- source: class Eq a
- main functions
- Minimal complete definition: either == or /=.
- source class Eq a => Ord a
- main functions
(<) :: a -> a -> Bool
infix 4, true if first parameter is less than second parameter otherwise false(<=) :: a -> a -> Bool
infix 4, true if first parameter is equal or less than second parameter otherwise false(>) :: a -> a -> Bool
infix 4, true if first parameter is greater than second parameter otherwise false(>=) :: a -> a -> Bool
infix 4, true if first parameter is equal or greater than second parameter otherwise falsemax :: a -> a -> a
the greater or equal value of both parameters
min :: a -> a -> a
the smaller or equal value of both parameters
- Minimal complete definition: either compare or ⇐. Using compare can be more efficient for complex types.
codesnippets/prelude/basictypeclasses.1618073487.txt.gz · Last modified: (external edit)
