Haskell 4 Recursive Posted on 2017-10-19 | Taking Notes from http://learnyouahaskell.com Recursive 1234567max :: (Ord a) => [a] -> amax [] = error "max of empty list"max [x] = xmax (x:xs) | x > maxTail = x | otherwise = maxTail where maxTail = max xs 123456789deplicate :: (Num i, Ord i) => i -> a -> [a]deplicate n x | n <= 0 = [] | otherwise = x:replicate (n - 1) xzip' :: [a] -> [b] -> [(a,b)] zip' _ [] = [] zip' [] _ = [] zip' (x:xs) (y:ys) = (x,y):zip' xs ys 123456quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = let smallerSorted = quicksort [a | a <- xs, a <= x] biggerSorted = quicksort [a | a <- xs, a > x] in smallerSorted ++ [x] ++ biggerSorted