19 lines
522 B
Plaintext
Vendored
19 lines
522 B
Plaintext
Vendored
{
|
|
val a = object: Function0<Int> {
|
|
override fun invoke(): Int = 1
|
|
}
|
|
val b = object: Function0<Int> {
|
|
override fun invoke(): Int = a() + 1
|
|
}
|
|
println(a() - b())
|
|
}
|
|
|
|
{
|
|
val b = object: Function0<Int> {
|
|
override fun invoke(): Int = 1
|
|
}
|
|
val a = object: Function0<Int> {
|
|
override fun invoke(): Int = b() + 1
|
|
}
|
|
println(b() - a())
|
|
} |