I have to write a DCG that generates strings from the alphabet a E {0,1,2} the strings have to have the form nn. This means queries like ?- s([0,2,1,0,2,1],[]). and s([1,1,2,0,1,1,2,0],[]). would return true.
This is the code I have so far. I'm so close. Can someone help me further?
s -->...