Created
July 4, 2009 14:12
-
-
Save motemen/140586 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object HelloWorld { | |
def quickSort(list : List[Double]) : List[Double] = | |
list match { | |
case Nil => Nil | |
case List(x) => list | |
case x :: xs => quickSort(xs filter (x >=)) ::: List(x) ::: quickSort(xs filter (x <)) | |
} | |
println(quickSort(List(3,1,4,1,5,9,2))) | |
println("Hello, world!") | |
} | |
HelloWorld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment