RosettaCodeData/Task/Inheritance-Single/OCaml/inheritance-single.ml

25 lines
391 B
OCaml

class animal =
object (self)
(*functions go here...*)
end
class dog =
object (self)
inherit animal
(*functions go here...*)
end
class cat =
object (self)
inherit animal
(*functions go here...*)
end
class lab =
object (self)
inherit dog
(*functions go here...*)
end
class collie =
object (self)
inherit dog
(*functions go here...*)
end