User
Prelude> sum . map read $ words
go [] string where go [] [] = True go acc (x:xs) | x elem "([{" = go (x:acc) xs | x elem ")]}" && not (null acc) && head acc == x = go (tail acc) xs | otherwise = False