Skip to content

Instantly share code, notes, and snippets.

@neodevelop
Created December 7, 2016 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neodevelop/f8ccf9a162f9b751c39307b0cf3af01c to your computer and use it in GitHub Desktop.
Save neodevelop/f8ccf9a162f9b751c39307b0cf3af01c to your computer and use it in GitHub Desktop.
qsort [] = []
qsort(x:xs) = qsort smaller ++ [x] ++ qsort larger
where
smaller = [ a | a <- xs, a <= x]
larger = [ b | b <- xs, b > x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment