Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- combs([H|_],[H]). % Simple case of one element comb
- combs([_|T],T2) :- % Combinations of the tail w/o head
- combs(T,T2).
- combs([H|T],[H|T2]) :- % Combinations of the tail including head
- combs(T,T2).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement