I want to check whether a element is in a list, and I want to implement it using Foldr. I know it is wrong, but I can't get any further than the code below
func :: Eq a => a -> [a] -> Bool
func a b = foldr (==) a b
I furthermore got the first line of code from the lectures, but I don't really understand why Eq a is necessary and what it does.