Short Interface implementation in kotlin

69 Views Asked by At

Now

in kotlin we have a possibility to implement the interface like this:

interface AnimalStrategy {
fun eat(): Outcome
}

Want to have

Question: Is it possible to declare the interface in kotlin in shorter syntax?

interface AnimalStrategy = fun eat(): Outcome
0

There are 0 best solutions below