which is basically what you would do in the delega...
# announcements
k
which is basically what you would do in the delegate, which would look like this:
Copy code
class Foo {
    val countGets by CountGetsDelegate()
}

class CountGetsDelegate {
    private var count = 0
    operator fun getValue(thisRef: Any?, property: KProperty<*>): Int {
        return ++count
    }
}