diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-10 11:14:46 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-10 11:14:46 -0800 |
commit | f40541788957c257ee8b4035e0063a8a48945c11 (patch) | |
tree | df574bd0aefe1e809fb890e42cdf2bf189659cfa /docs/examples/sort1.scala | |
parent | 0c927046dc5df974e6c39187107cf3548825282b (diff) | |
parent | 27a38602decb891399fc9868b4dd7135f6e1ec2c (diff) | |
download | scala-f40541788957c257ee8b4035e0063a8a48945c11.tar.gz scala-f40541788957c257ee8b4035e0063a8a48945c11.tar.bz2 scala-f40541788957c257ee8b4035e0063a8a48945c11.zip |
Merge pull request #3248 from adriaanm/dist-cleanup-licenses
Clean up Scala distribution a bit.
Diffstat (limited to 'docs/examples/sort1.scala')
-rw-r--r-- | docs/examples/sort1.scala | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/docs/examples/sort1.scala b/docs/examples/sort1.scala deleted file mode 100644 index 39e5519fe0..0000000000 --- a/docs/examples/sort1.scala +++ /dev/null @@ -1,22 +0,0 @@ -package examples - -object sort1 { - - def sort(a: List[Int]): List[Int] = { - if (a.length < 2) - a - else { - val pivot = a(a.length / 2) - sort(a.filter(x => x < pivot)) ::: - a.filter(x => x == pivot) ::: - sort(a.filter(x => x > pivot)) - } - } - - def main(args: Array[String]) { - val xs = List(6, 2, 8, 5, 1) - println(xs) - println(sort(xs)) - } - -} |