Skip to content

Instantly share code, notes, and snippets.

@aostiles
Created February 28, 2017 07:44
Show Gist options
  • Save aostiles/3e725b560c8ffa4fa84c28ba616c6aaf to your computer and use it in GitHub Desktop.
Save aostiles/3e725b560c8ffa4fa84c28ba616c6aaf to your computer and use it in GitHub Desktop.
null created by aostiles - https://repl.it/GA9l/0
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