I understand that I need to figure out my own homework, but seeing that noone in the class can figure it out, I need some help.
Write a Prolog program such that
p(X)
is true ifX
is a list consisting ofn
a
's followed byn+1
b
's, for anyn >= 1
.