hello ..
am trying to find all possible list permutations that satisfy a specific conditions .. i managed to do :
test :- bp(3,12,[7, 3, 5, 4, 6, 4, 5, 2], Answer),
format("Answer = ~w\n",[Answer]).
bp(NB,C,OL,A):-
addIn(C,OL,[[],[],[]],A);
bp(NB,C,_,A)...