kojdecki
04/28/2017, 2:56 PMinterface TestInterface {
fun apply(str: String): String
}
fun TestInterface(lambda: (String) -> String): TestInterface {
return object : TestInterface {
override fun apply(str: String): String = lambda(str)
}
}
fun main(args: Array<String>) {
var test = TestInterface { str: String -> str.apply { println(str) } }
test.apply("test")
}
You can throw some inlines in there.north
04/28/2017, 3:00 PM