Given your example, it looks like you might really need a powerset , not a permutation of this list.
For example, the force set [a,b] is the set { [a,b] , [a] , [b] , [] }.
To compute a list of list parameters in Prolog, check out this answer from @gusbro. If this helps you, please also support this answer.
If you want all the solutions to force the set of L lists at once, you can associate the powerset/2 call with the findall/3 call as follows:
?- findall(S, powerset(L, S), Ss).
If, on the other hand, you are after sections (as already mentioned in one of your previous changes), consider the following:
partition(L, PL) :- partition(L, [], PL). partition([], [], []). partition([X|Xs], As, R) :- % add X into the new partition... append(As, [X], NewAs), partition(Xs, NewAs, R). partition(L, [A|As], [[A|As]|R]) :- % ...or, collect the current non-empty partition partition(L, [], R).
Partition partition/2 predicate accepts a list and returns all partitions as you described. For instance:
?- partition([a,b,c],L). L = [[a, b, c]] ; L = [[a, b], [c]] ; L = [[a], [b, c]] ; L = [[a], [b], [c]] ; false.