This question was inspired by this answer to another question, indicating that you can remove every occurrence of an element from a list using a function defined as:
It is also worth noting that if you don't assign a name to the expression, typechecker seems to avoid type defaulting:
Prelude> :t filter . (/=)
filter . (/=) :: (Eq a) => a -> [a] -> [a]
Why is Haskell inferring such a specific type for the function?
GHCi is using type defaulting, to infer a more specific type from a set of possibles. You can avoid this easily by disabling the monomorphism restriction,
Prelude> :set -XNoMonomorphismRestriction
Prelude> let removeall = filter . (/=)
Prelude> :t removeall
removeall :: (Eq a) => a -> [a] -> [a]