I want to make prolog returning me all possible sublists of given list so I wrote:
subSet(L,S):- append(_,L2,L),append(S,_,L2).
In that way I get result like:
Out = [] ;
Out = [a] ;
Out = [a, b] ;
Out = [a, b, c] ;
Out = [] ;
Out = [b] ;
Out = [b, c] ;
Out = [] ;
Out = [c] ;
Out = [] ;
What I have to do to get rid of repeating empty list?