``` class C{ var l: () -> Unit = {println("hel...
# announcements
Copy code
class C{ 
var l: () -> Unit = {println("hello")}; 
fun onClick(){ l() }}
val c = C()
c.l = { println("world") }
is this ok?
what is your question? what would you expect from this code? Answering your current question - yes, this is ok
☝️ 2
the original question is I want avoid multiple click on View.setOnClickListener, so I use a class to inherit and use variable to store latest click time, to check if it's click so often
This code doesn't look as what you described