Skip to content

Instantly share code, notes, and snippets.

@magnucki
Created October 13, 2014 16:56
Show Gist options
  • Select an option

  • Save magnucki/48e81c9a83dbc102acbf to your computer and use it in GitHub Desktop.

Select an option

Save magnucki/48e81c9a83dbc102acbf to your computer and use it in GitHub Desktop.
simple quicksort
qsort:: [Int] -> [Int]
qsort [] = []
qsort [a] = [a]
qsort (x:xs) = (qsort [b | b <- xs , b < x]) ++ [x] ++ (qsort [b | b <- xs, b > x])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment