Created
February 3, 2021 11:29
-
-
Save freeman42x/46f2a396fe3ec787b37907864b0b90fa to your computer and use it in GitHub Desktop.
Haskell inefficient but readable QuickSort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qsort [] = [] | |
qsort (p:xs) = qsort lesser ++ [p] ++ qsort greater | |
where lesser = filter (< p) xs | |
greater = filter (>= p) xs | |
-- Made you look at Haskell Ria :p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment