import Data.List quickSort [] = [] quickSort (x:xs) = (quickSort smaller) ++ [x] ++ (quickSort bigger) where (smaller, bigger) = partition (<=x) xs