RosettaCodeData/Task/Inheritance-Single/OCaml/inheritance-single.ocaml
2023-12-16 21:33:55 -08:00

24 lines
391 B
Text

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