, , , . , if-else if-else , :
getToNextSign :: String -> String
getToNextSign str
| a `elem` mathSigns = str
| tail str /= [] = getToNextSign $ tail str
| otherwise = []
where
a = head str
mathSigns = ['+' , '-' , '*' , '/' , '^' , ')']
, / ,
getToNextSign :: String -> String
getToNextSign (c:cs)
| c `elem` mathSigns = c:cs
| not (null cs) = getToNextSign cs
| otherwise = []
where
mathSigns = ['+' , '-' , '*' , '/' , '^' , ')']
, .
getToNextSign :: String -> String
getToNextSign str = case str of
c:_ | c `elem` mathSigns -> str
c:[] -> []
_:cs -> getToNextSign cs
where mathSigns = ['+' , '-' , '*' , '/' , '^' , ')']
, , , getToNextSign , , , .