domains
x = char
l = char*
predicates
palindrome(l)
reverse(l,l)
concatenate(l,l,l)
clauses
concatenate([],List,List).
concatenate([X|List1],List2,[X|List3]) :-
concatenate(List1,List2,List3).
reverse([],[]).
reverse([X|Tail],List) :-
reverse(Tail,Tail1),
concatenate(Tail1,[X],List).
palindrome(List) :-
reverse(List,List).