Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- combs_without_empty(L,C) :-
- combs_without_empty(L,0,C).
- combs_without_empty([A],_,[A]).
- combs_without_empty([_],N,[]) :-
- N > 0.
- combs_without_empty([_|T],N,T2) :-
- combs_without_empty(T,N,T2).
- combs_without_empty([H|T],N,[H|T2]) :-
- N1 is N+1,
- combs_without_empty(T,N1,T2).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement