From 49709d852fb909e9e2f1d77c4baa62ad2ea71ac7 Mon Sep 17 00:00:00 2001 From: Etienne Kneuss <colder@php.net> Date: Thu, 4 Sep 2014 12:58:23 +0200 Subject: [PATCH] Add :: to List API --- library/collection/List.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/collection/List.scala b/library/collection/List.scala index b94f4fd2e..521a573a1 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) -- GitLab