Skip to content

Instantly share code, notes, and snippets.

@posaunehm
Created June 17, 2012 00:46
Show Gist options
  • Save posaunehm/2943026 to your computer and use it in GitHub Desktop.
Save posaunehm/2943026 to your computer and use it in GitHub Desktop.
An quick sort implementation by F#
let rec qSort (x : List<'a>) =
if x.Length <= 1 then x
else
let parted = x.Tail |> List.partition (fun i -> i < x.Head)
List.append (fst parted |> qSort) (x.Head::(snd parted |> qSort))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment