Dili1234 -2 Junior Poster

When I used this coding I didn't any output though is no errors.

palli([H]).
palli([]).
palli([H|T])-append(T,H,[T|H]).

I got the output as

[4] 6 ?- palli([m,a,m]),append(K,L,J).
K = [],
L = J .
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.