This is what I have tried so far;
buy(X,L) :- recipe(X,Ls), compare3(L,Ls).
compare3([], []).
compare3(K, [L|Ls]):- compareAtHome(L, at_home(Ks),K), compare3(L, Ls).
compareAtHome(ingredient(F1,S1),[ingredient(F2,S2)|Ks], L):- (F1==F2 -> to_buy(S1,S2, K), add(ingredient(F1,K),L,L1)...
Hey everyone, pretty new to Prolog and just started programming in it,hence the "newbie"-questions.
I decided to make a small software that, this is basic I know - but I have trouble getting started with it, anyways here's the example;
I'm a carpenter, wanting to build different things for my...
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.