Skip to content

Instantly share code, notes, and snippets.

@clausjoergensen
Created November 8, 2010 08:41
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 clausjoergensen/667484 to your computer and use it in GitHub Desktop.
Save clausjoergensen/667484 to your computer and use it in GitHub Desktop.
let rec QuickSort(input : List<int>) =
match input with
| [] -> []
| head :: tail ->
let smaller = qsort (tail |> List.filter(fun e -> e <= x))
let larger = qsort (tail |> List.filter(fun e -> e >= x))
smaller @ [head] @ larger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment