Closed dalewking closed 1 year ago
Makes sense, thanks.
Sorry, but I had to revert this change. Those interfaces are likely to get more methods in the future.
Consider the following kind of helpers for your needs:
fun Logger(log: (String) -> Unit): Logger =
object : Logger {
override fun log(text: String) {
log.invoke(text)
}
}
Logger interface has one method so it should be declared a fun interface so that it can be implemented using a lambda.