-- Importing stuff from the Haskell standard library is going to be useful
-- especially functions from Data.List
{- Exercise 12.1 -}
data Tree a = Empty | Node (Tree a) a (Tree a)
mapTree :: (a -> b) -> Tree a -> Tree b
mapTree = undefined
heapP :: (a -> a -> Bool) -> Tree a -> Bool
heapP = undefined
treapP :: (Ord a, Ord b) => Tree (a,b) -> Bool
treapP = undefined
{- Exercise 12.2 -}
-- The function length has type [a] -> Int.
-- So it returns a machine integer instead of an arbitrary precision integer (Type Integer).
-- Therefore it makes sense to have lenWfBrackets return an Int.
-- If you need the type Integer here, feel free to change the type.
lenWfBrackets :: String -> Int
lenWfBrackets = undefined
{- Exercise 12.3 -}
summ :: IO ()
summ = undefined
{- Exercise 12.4 -}
combinationSum :: [Integer] -> Integer -> [[Integer]]
combinationSum = undefined