1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# coding=utf-8 id = 112 group = 'lists' number = 19 visible = True facts = None solution = '''\ conc112([], L, L). conc112([H|T], L2, [H|L]) :- conc112(T, L2, L). rev112([], []). rev112([H|T], R):- rev112(T, R1), conc112(R1, [H], R). palindrome(L) :- rev112(L, L). '''