yea so i put "compare3([H|T], CurAcc, FinalAcc) :- Acc1 is CurAcc + H, sum(T, Acc1, FinalAcc)." after "compare3([], LstToBuy, LstToBuy)." but i still don't get it to work, what am i doing wrong?
What do you mean by "walk through the list with compare3(LstNeeded, CurrentLstToBuy, FinalLstToBuy)." could you show an example or write it in the code?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.