# Pastebin BDYGOBhK -- Tried to define the same all function this way using recursion but gives error all''' :: (a -> Bool) -> [a] -> Bool all''' f [] = True all''' f (x:xs) = f x && all''' xs {- this is the error 2-functions-higherorder.hs:10:26: error: • Couldn't match expected type ‘Bool’ with actual type ‘[a0] -> Bool’ • Probable cause: ‘all''’ is applied to too few arguments In the second argument of ‘(&&)’, namely ‘all''' xs’ In the expression: f x && all''' xs In an equation for ‘all'''’: all''' f (x : xs) = f x && all''' xs | 10 | all''' f (x:xs) = f x && all''' xs | ^^^^^^^^ 2-functions-higherorder.hs:10:32: error: • Couldn't match expected type ‘a0 -> Bool’ with actual type ‘[a]’ • In the first argument of ‘all''’, namely ‘xs’ In the second argument of ‘(&&)’, namely ‘all'' xs’ In the expression: f x && all'' xs • Relevant bindings include xs :: [a] (bound at 2-functions-higherorder.hs:10:13) x :: a (bound at 2-functions-higherorder.hs:10:11) f :: a -> Bool (bound at 2-functions-higherorder.hs:10:8) all''' :: (a -> Bool) -> [a] -> Bool (bound at 2-functions-higherorder.hs:9:1) | 10 | all''' f (x:xs) = f x && all'' xs -}