I'm having some trouble in Prolog (SWI). If I would do this:
Code: Select all
?- findall(A-B,append(A,B,[1,2,3]),L).
Code: Select all
L = [[] - [1,2,3],[1] - [2,3],[1,2] - [3],[1,2,3] - []]
[] - [1,2,3] -> no (or whatever)
[1] - [2,3] -> 1
[1,2] - [3] -> 2
[1,2,3] - [] -> 3
Thanks in advance.