today I read a lot about Haskell but this formating is driving me crazy. I want to understand my basic errors as soon as possible so I can start coding normally. The function here should return a string that starts with the next "math Sign" example string (2sdwds+asd)+3 should return +asd)+3.
Here is the code
getToNextSign :: String -> String
getToNextSign str = do
let mathSigns = ['+' , '-' , '*' , '/' , '^' , ')']
let a = head str
if a `elem` mathSigns
then str
else if tail str /= []
then getToNextSign $ tail str
else []
main = do
putStrLn $ getToNextSign "(2sdwds+asd)+3"
It gives me " parse error on input = ". I am also not sure about how exactly to call it in the main and do I really need the putStrLn function. I don't think I need it but I tried like 2874 different ways to write this and now I just gave up and need help.