Skip to content

Instantly share code, notes, and snippets.

@kmikael
Created February 11, 2012 18:39
Show Gist options
  • Save kmikael/1803487 to your computer and use it in GitHub Desktop.
Save kmikael/1803487 to your computer and use it in GitHub Desktop.
quicksort in Haskell
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) = quicksort (filter (< x) xs) ++ [x] ++ quicksort (filter (>= x) xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment