Reputation: 491
in kotlin we have a possibility to implement the interface like this:
interface AnimalStrategy {
fun eat(): Outcome
}
Question: Is it possible to declare the interface in kotlin in shorter syntax?
interface AnimalStrategy = fun eat(): Outcome
Upvotes: 0
Views: 78