how to ignore the first match of a result when generating the combination of K elements in a list in prolog ?
%here is the code.
combination(0,_,[]).
combination(N,[X|T],[X|Comb]):-N>0,N1 is N-1,combination(N1,T,Comb).
combination(N,[_|T],Comb):-N>0,combination(N,T,Comb).
?- combination(3,[3,8,9,10,12,14],S).
%result will be.
S = [3, 8, 9] ;
S = [3, 8, 10] ;
S = [3, 8, 12] ;
S = [3, 8, 14] ;
S = [3, 9, 10] ;
S = [3, 9, 12] ;
S = [3, 9, 14] ;
S = [3, 10, 12] ;
S = [3, 10, 14] ;
S = [3, 12, 14] ;
S = [8, 9, 10] ;
S = [8, 9, 12] ;
S = [8, 9, 14] ;
S = [8, 10, 12] ;
S = [8, 10, 14] ;
S = [8, 12, 14] ;
S = [9, 10, 12] ;
S = [9, 10, 14] ;
S = [9, 12, 14] ;
S = [10, 12, 14] ;
false.
%I want to ignore the first match [3,8,9].