Overloading
Polymorphic functions use the same definition at each type.
Overloaded functions may have a different definition at each type.
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x/=y = not (x==y)
Class name.
Class
methods
and types.
Default definition.
Read:
“a is a type in class Eq, if it has the following methods”.
Föregående bild
Nästa bild
Tillbaka till första bilden
Visa grafisk version