Here's what I have to do next, I have a list A and a list B with the couples of the elements of list A, for example: list A=[4,5,6,7,8,9] and list B=[[4,5],[6,7],[8,9]].
I have made a programm, but the only thing it does when I insert a example, is true. Here it is:
couples([H, H1|A], B) :- append([H], [H1], L), pair_list(A, [L|B]).
But it's wrong. The question is, what is the right one?