15 lines
145 B
Kotlin
Vendored
15 lines
145 B
Kotlin
Vendored
interface Expr
|
|
class Num(val value : Int) : Expr
|
|
|
|
fun eval(e : Expr) {
|
|
if (e is Num) {
|
|
return e.<caret>
|
|
}
|
|
}
|
|
|
|
// EXIST: value
|
|
|
|
|
|
|
|
|