Skip to content

Instantly share code, notes, and snippets.

Created Apr 3, 2012
What would you like to do?
Quick Sort
quickSort :: (Ord a) => [a] -> [a]
quickSort [] = []
quickSort (x:xs) = quickSort smaller ++ [x] ++ quickSort larger
where smaller = filter (<=x) xs
larger = filter (>x) xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment