Skip to content

Instantly share code, notes, and snippets.

@motemen
Created July 4, 2009 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/140586 to your computer and use it in GitHub Desktop.
Save motemen/140586 to your computer and use it in GitHub Desktop.
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