Haskell 實現
quickSort::Ord a => [a] -> [a]
quickSort [] = []
quickSort (x:xs) = quickSort [ y | y <- xs, y <= x ]
++ [x]
++ quickSort [ z | z <- xs, z > x ]
quickSort::Ord a => [a] -> [a]
quickSort [] = []
quickSort (x:xs) = quickSort [ y | y <- xs, y <= x ]
++ [x]
++ quickSort [ z | z <- xs, z > x ]