Skip to content

Instantly share code, notes, and snippets.

@jlbelmonte
Created December 26, 2012 19:06
Show Gist options
  • Save jlbelmonte/4382301 to your computer and use it in GitHub Desktop.
Save jlbelmonte/4382301 to your computer and use it in GitHub Desktop.
qSort :: (Ord a) => [a] -> [a]
qSort [] = []
qSort (x:xs) =
let left = qSort (filter (<=x) xs)
right = qSort (filter(>x) xs)
in left ++ [x] ++ right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment