RosettaCodeData/Task/Inheritance-Single/OCaml/inheritance-single.ml
2024-10-16 18:07:41 -07:00

24 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