name = 'paren/3' slug = 'properly nested parens with meaning' description = '''\
Write a DCG with the starting symbol paren
for the language of properly nested sequences of parentheses. The meaning of a word in this language is the maximum depth of the nested parentheses.
?- paren(D, ['(','(',')',')','(',')'], []). % (())() D = 2.''' hint = {}