13 lines
276 B
Plaintext
Vendored
13 lines
276 B
Plaintext
Vendored
fun <T: A> foo(t: T): Int {
|
|
fun a(p: Int): Int = p + 1
|
|
fun b(q: Int): Int = q - 1
|
|
|
|
return t.n + a(1) - b(2)
|
|
}
|
|
|
|
fun <U: A> foo(u: U): Int {
|
|
fun x(a: Int): Int = a + 1
|
|
fun y(a: Int): Int = a - 1
|
|
|
|
return u.n + x(1) - y(2)
|
|
} |