i have been trying to find all possible combinations of a list given to me. This is the program i have at the moment but i can't see why it doesn't work. Please Could Someone help me.
swap([],[]).
swap([H|[H1|T]],[H1|[H|T1]]):-
swap(T,T1).
move(List,New):-
swap(List,New1),
New is New1.
ANY IDEAS WOULD BE GREAT Andrew
swap([],[]).
swap([H|[H1|T]],[H1|[H|T1]]):-
swap(T,T1).
move(List,New):-
swap(List,New1),
New is New1.
ANY IDEAS WOULD BE GREAT Andrew