blob: e5ffe1a28ce1eca043df1dd64743627fe31d278d (
plain) (
tree)
|
|
enum List[+T] {
case Cons(x: T, xs: List[T])
case Nil extends List[Nothing]
}
object Test {
import List._
val xs = Cons(1, Cons(2, Cons(3, Nil)))
def main(args: Array[String]) = println(xs)
}
|