📜  haskell 获取字符串的特定元素 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:33.944000             🧑  作者: Mango

代码示例1
onlyParenthesis :: String -> String
onlyParenthesis [] = []
onlyParenthesis (x:xs)
                 | x /= '(' && x /= ')' && x /= '[' && x /= ']' && x /= '{' && x /= '}'= onlyParenthesis xs
                 | otherwise = x : onlyParenthesis xs