``` class C{ var l: () -> Unit = {println("hel...
# announcements
i
Copy code
class C{ 
var l: () -> Unit = {println("hello")}; 
fun onClick(){ l() }}
val c = C()
c.l = { println("world") }
is this ok?
b
what is your question? what would you expect from this code? Answering your current question - yes, this is ok
☝️ 2
i
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
g
This code doesn't look as what you described