Gebruik DCG Grammatica regels om het predicaat repeated(Count, Head, Tail) te schrijven. Dit predicaat moet waar zijn al Head-Tail een verschillijst is met als inhoud \(\texttt{a}^\texttt{Count}\texttt{b}^\texttt{Count}\texttt{c}^\texttt{Count}\). Dit predicaat moet in 2 richtingn kunnen gebruikt worden.

?- repeated(3,L,[]).
L = [a, a, a, b, b, b, c, c, c] .

?- repeated(Count,[a,a,b,b,c,c],[]).
Count = 2 

Het moet ook mogelijk zijn om alle oplossingen te genereren:

?- repeated(Count,L,[]).
Count = 0,
L = [] ;
Count = 1,
L = [a, b, c] ;
Count = 2,
L = [a, a, b, b, c, c] ;
Count = 3,
L = [a, a, a, b, b, b, c, c, c] ;
Count = 4,
L = [a, a, a, a, b, b, b, b, c|...] ;
Count = 5,
L = [a, a, a, a, a, b, b, b, b|...] ;
...