📜  haskell 代码示例中的快速排序

📅  最后修改于: 2022-03-11 14:53:35.024000             🧑  作者: Mango

代码示例1
quicksort :: Ord a => [a] -> [a]
quicksort []     = []
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
    where
        lesser  = filter (< p) xs
        greater = filter (>= p) xs