Created
February 28, 2017 07:44
-
-
Save aostiles/3e725b560c8ffa4fa84c28ba616c6aaf to your computer and use it in GitHub Desktop.
null created by aostiles - https://repl.it/GA9l/0
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 (x:xs) = (qsort lesser) ++ [x] ++ (qsort greater) | |
where | |
lesser = filter (<x) xs | |
greater = filter (>=x) xs | |
main = qsort [3,1,2,3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment