diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-09 11:06:22 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-09 17:11:05 -0800 |
commit | e55510607031aaf7b8473453f83c44a26c9b97e0 (patch) | |
tree | 987d4aeeef387ed435acc64ffadfdf78e6f65bce /docs/examples/sort2.scala | |
parent | dc6dd58d9da441b591580684f3d2f38d7898e7d4 (diff) | |
download | scala-e55510607031aaf7b8473453f83c44a26c9b97e0.tar.gz scala-e55510607031aaf7b8473453f83c44a26c9b97e0.tar.bz2 scala-e55510607031aaf7b8473453f83c44a26c9b97e0.zip |
Remove docs/examples; they reside at scala/scala-dist
Diffstat (limited to 'docs/examples/sort2.scala')
-rw-r--r-- | docs/examples/sort2.scala | 25 |
1 files changed, 0 insertions, 25 deletions
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)) - } - -} |