Instantly share code, notes, and snippets.

@Spirans /qs
Created May 16, 2018

Embed
What would you like to do?
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let big = quicksort [i | i <- xs, i > x]
small = quicksort [i | i <- xs, i <= x]
in small ++ [x] ++ big
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment