codesnippets:prelude:basictypeclasses
This is an old revision of the document!
Eq
- source: class Eq a
- main functions
(==):: a -> a -> Boolinfix 4, true if equal otherwise false(/=):: a -> a -> Boolinfix 4, false if equal otherwise true
- Minimal complete definition: either
==or/=.
Ord
- source: class Eq a => Ord a
- main functions
compare:: a -> a -> Ordering- LT if first parameter is less then second parameter,
- EQ if first parameter is equal second parameter, and
- GT if first parameter is greater then second parameter
(<):: a -> a -> Boolinfix 4, true if first parameter is less than second parameter otherwise false(<=):: a -> a -> Boolinfix 4, true if first parameter is equal or less than second parameter otherwise false(>):: a -> a -> Boolinfix 4, true if first parameter is greater than second parameter otherwise false(>=):: a -> a -> Boolinfix 4, true if first parameter is equal or greater than second parameter otherwise falsemax:: a -> a -> athe greater or equal value of both parametersmin:: a -> a -> athe 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.1618073932.txt.gz ยท Last modified: (external edit)
