Skip to content

Instantly share code, notes, and snippets.

@barce
Created January 9, 2013 22:38
Show Gist options
  • Save barce/4497663 to your computer and use it in GitHub Desktop.
Save barce/4497663 to your computer and use it in GitHub Desktop.
quicksort in haskell
qsort [] = []
qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment