Hey I'm a pretty new beginner to Haskell and I am having a small problem.
I want to write a function which checks if a given character is in a given string. Here is my code :
inString :: String -> Char -> Bool
inString [] _ = False
inString x c = x == c
inString x:xs c = inString xs c
For me this makes perfect sense as I know that Strings are just Lists of Characters. But I am getting a Parse error in pattern : inString.
Any help would be appreciated.