Answers for "quicksort fct haskell"

1

quicksort in haskell

quicksort :: Ord a => [a] -> [a]
quicksort []     = []
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
    where
        lesser  = filter (< p) xs
        greater = filter (>= p) xs
Posted by: Guest on June-28-2020

Browse Popular Code Answers by Language