https://kotlinlang.org logo
z

zachtib

11/26/2018, 2:37 PM
If I want to have a member function of a class that accepts a block of code to run with itself as the receiver (similar to
apply
, but not as an extension function), how do I template that? ie
fun foo(block: this.() -> Unit)
, but that's obviously not correct.