RosettaCodeData/Task/Inheritance-Single/F-Sharp/inheritance-single.fs

16 lines
202 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
type Animal() =
class // explicit syntax needed for empty class
end
type Dog() =
inherit Animal()
type Lab() =
inherit Dog()
type Collie() =
inherit Dog()
type Cat() =
inherit Animal()