module ShunyaLibrary (quicksort) where quicksort :: Ord a => [a] -> [a] quicksort [] = [] quicksort (x:xs) = quicksort smaller ++ [x] ++ quicksort larger where smaller = [n | n <- xs, n <= x] larger = [n | n <- xs, n > x]