Lee young-jun
Apr 8, 2024

--

What is different to -> Animal?

I guess if Animal doesn't have associatedtype, some is not required.

func getAnimal() -> Animal {

return Dog()

}

func sound(){

let dog = getAnimal()

print(dog.makeSound())

}

--

--

No responses yet