haskell get specific elements of a String code example
Example: haskell get specific elements of a String
onlyParenthesis :: String -> String
onlyParenthesis [] = []
onlyParenthesis (x:xs)
| x /= '(' && x /= ')' && x /= '[' && x /= ']' && x /= '{' && x /= '}'= onlyParenthesis xs
| otherwise = x : onlyParenthesis xs