Inheritance/Single: Difference between revisions
Added Haskell.
m (Fixed lang tags.) |
Underscore (talk | contribs) (Added Haskell.) |
||
Line 226:
//contents go here...
}</lang>
=={{header|Haskell}}==
A type can't inherit properties from other types, but it can belong to any number of type classes, which may themselves be subclasses of other type classes.
<lang haskell>class Animal a where
class Animal a => Cat a where
class Animal a => Dog a where
class Dog a => Lab a where
class Dog a => Collie a where</lang>
=={{header|HaXe}}==
|