Below is the given program to print if a list is palindrome or not but I am not able to use condition L1=L & L1<>L for printing "List is Palindrome!" & "List is not palindrome", By the way I almost tried every way available online for doing it but to no avail was it a success.
I tried (if -> then ; else) & (if , then);(else , then) and many more but all resulted in failure. Your help is highly appreciated!
domains
ll=integer*
predicates
rev(ll,ll).
revl(ll,ll,ll).
clauses
rev(L1,L):-
revl(L1,[],L).
% I want to use if and else here to print If it is palindrome or not!
revl([],L,L).
revl([H|L1],L2,L3):-
revl(L1,[H|L2],L3).