That’s how we finally call the magic function! Inc...
# functional
d
That’s how we finally call the magic function! Incredibly useless, but funny
Copy code
fun <B: (B) -> B> rec(arg: B): B {
    return arg(arg)
}

class A: (A) -> A {
    override fun invoke(p1: A) = p1
}

fun main(args: Array<String>) {
    rec(A())
}
🎉 2