diff --git a/library/collection/List.scala b/library/collection/List.scala index b94f4fd2ef464234010ea11f8003c513e5c083dc..521a573a1f811e21d1a33ca583305b706eb4d8b0 100644 --- a/library/collection/List.scala +++ b/library/collection/List.scala @@ -52,6 +52,8 @@ sealed abstract class List[T] { } } + def ::(t:T): List[T] = Cons(t, this) + def :+(t:T): List[T] = { this match { case Nil() => Cons(t, this)