Basic Examples 
(3)
 

Here is the simplest nontrivial example with two pairs of brackets:
In[1]:=
[◼]
DyckWords
@2
Out[1]=
{[[]],[][]}
———
Here are the ways to nest three pairs of brackets:
In[1]:=
[◼]
DyckWords
@3
Out[1]=
{[[[]]],[[][]],[[]][],[][[]],[][][]}
There are five ways to do that:
In[2]:=
Length@%
Out[2]=
5
———
Dyck words are counted by the Catalan numbers:
In[1]:=
Length@
[◼]
DyckWords
[#]&/@Range[10]
Out[1]=
{1,2,5,14,42,132,429,1430,4862,16796}
In[2]:=
CatalanNumber@Range@10
Out[2]=
{1,2,5,14,42,132,429,1430,4862,16796}

Scope 
(2)
 
