@anonymous/

FortunateWittyFormulas

Kotlin (beta)

No description

fork
loading
main.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
fun <T>with(instance: T, proc: T.() -> Unit): T {
    instance.proc()
    return instance
}

class Lol {
    fun foo() {
        println("lol")
    }
}

class Lel {
    fun bar() {
        println("lel")
    }
}

with(Lol()) {
    foo()
    with(Lel()) {
        bar()
        foo()
    }
}
Welcome to Kotlin version 1.0.3