Question: I implement my code like this but it says that Non-exhaustive patterns in function qsort. f in qsort function deal with = 5. Implement bubble

 I implement my code like this but it says that Non-exhaustivepatterns in function qsort. f in qsort function deal with = 5.

I implement my code like this but it says that Non-exhaustive patterns in function qsort.

f in qsort function deal with =

5. Implement bubble sort, quicksort, and merge sort in Haskell: bsort::(a -> a -> Bool) => [a] -> [a] qsort:: (a -> a -> Bool) -> [a] => [a] msort:: (a -> a -> Bool) -> [a] => [a] qSmallToBig :: (Ord a) => [a] => [a] qSmallToBig [] [] qSmallToBig (x:xs) = let smallerSorted = qSmallToBig [a | a = x] in smallerSorted ++ [x] ++ biggerSorted qBigToSmall :: (Ord a) => [a] => [a] qBigToSmall [] [] qBigToSmall (x:xs) = let smallerSorted = qBigToSmall [a | a = x] in biggerSorted ++ [x] ++ smallerSorted qsort:: Integral a => (a -> a -> Bool) [a] -> [a] qsort [a] = [a] qsort f [a] | f 2 1 = qBigToSmall [a] | otherwise = qSmallToBig [a] = -> 5. Implement bubble sort, quicksort, and merge sort in Haskell: bsort::(a -> a -> Bool) => [a] -> [a] qsort:: (a -> a -> Bool) -> [a] => [a] msort:: (a -> a -> Bool) -> [a] => [a] qSmallToBig :: (Ord a) => [a] => [a] qSmallToBig [] [] qSmallToBig (x:xs) = let smallerSorted = qSmallToBig [a | a = x] in smallerSorted ++ [x] ++ biggerSorted qBigToSmall :: (Ord a) => [a] => [a] qBigToSmall [] [] qBigToSmall (x:xs) = let smallerSorted = qBigToSmall [a | a = x] in biggerSorted ++ [x] ++ smallerSorted qsort:: Integral a => (a -> a -> Bool) [a] -> [a] qsort [a] = [a] qsort f [a] | f 2 1 = qBigToSmall [a] | otherwise = qSmallToBig [a] = ->

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!