Q:

Haskell - Passing multiple functions into a function

Im trying to test passing two functions into 'myfunc' to perform operations of the elements of an Int list. 
*This is purely to test -- i know I can use filter, even etc.. just testing code here
 addone :: Int -> Int
 addone i = i + 1
 addoone _ = 0

checkeven :: Int -> Bool
checkeven n 
   | even n == True = True
   | otherwise      = False

myfunc :: (Int -> Bool) -> (Int -> Int) -> [Int] -> [Int]
myfunc ce ao [] = []
myfunc _ ao (x : xs) = []
myfunc ce _ (x : xs) = []
myfunc ce ao (x : xs) = if ce x then ao x : tail else tail where
   tail = myfunc ce ao xs

mylist = [1,2,3,3,3,1,1,4]
main = do
  let x = myfunc checkeven addone mylist
  putStrLn $ show x

Getting an error when trying to run this of 'Non-exhaustive patterns'... Any ideas?  

A:

In myfunc these two lines are useless because when pattern matching they mean the same thing (also they are not the final stage of the recursion you are looking for) :
myfunc _ ao (x : xs) = []
myfunc ce _ (x : xs) = []

also in the first pattern match ce ao are useless, because they are not used anywhere so they should be a _.  
So myfunc should look like this:
myfunc :: (Int -> Bool) -> (Int -> Int) -> [Int] -> [Int]
myfunc _ _ [] = []
myfunc ce ao (x : xs) = if ce x then ao x : tail else tail where
   tail = myfunc ce ao xs

