From e55510607031aaf7b8473453f83c44a26c9b97e0 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 9 Dec 2013 11:06:22 -0800 Subject: Remove docs/examples; they reside at scala/scala-dist --- docs/examples/sort2.scala | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 docs/examples/sort2.scala (limited to 'docs/examples/sort2.scala') diff --git a/docs/examples/sort2.scala b/docs/examples/sort2.scala deleted file mode 100644 index e0016088bb..0000000000 --- a/docs/examples/sort2.scala +++ /dev/null @@ -1,25 +0,0 @@ -package examples - -object sort2 { - - def sort(a: List[Int]): List[Int] = { - if (a.length < 2) - a - else { - val pivot = a(a.length / 2) - def lePivot(x: Int) = x < pivot - def gtPivot(x: Int) = x > pivot - def eqPivot(x: Int) = x == pivot - sort(a filter lePivot) ::: - (a filter eqPivot) ::: - sort(a filter gtPivot) - } - } - - def main(args: Array[String]) { - val xs = List(6, 2, 8, 5, 1, 8) - println(xs) - println(sort(xs)) - } - -} -- cgit v1.2.3