I've been struggling for like an hour to understand some things in higher order functions and now I am at the point that I cannot move any further because of this error:
hof :: [Integer] -> (Integer -> Integer)
isIn :: [Integer] -> Integer -> Integer
isIn [] s = 0
isIn [] _ = 0
isIn (h:t) s
| h == s = 0 {-<-------- error points here here-}
| otherwise = isIn(t) + 1
hof s = \n -> isIn s n
ERROR file:.\Lab2.hs:111 - Type error in explicitly typed binding
*** Term : isIn
*** Type : [Integer] -> Integer -> Integer -> Integer
*** Does not match : [Integer] -> Integer -> Integer