Do not use this tag like Prologue and Epilogue.
Trying to write a procedure that given a value and a list, it deletes all the occurence of that value …
prolog prolog-difThis is my code:- fib(0,0). fib(1,1). fib(F,N) :- N>1, N1 is N-1, N2 is N-2, F …
prolog fibonacci instantiation-errorI'm using SWI-Prolog on Windows and am getting the following error: 14 ?- parent(X, Y) :- child(Y, X). ERROR: …
prolog prolog-toplevelI have been reading many articles trying to understand the difference between functional and logic programming, but the only deduction …
haskell functional-programming prologHow can I write the following rule in PROLOG: if P then not Q I understand that you can easily …
prolog negationHow do you write a Prolog procedure map(List, PredName, Result) that applies the predicate PredName(Arg, Res) to the …
prolog map-function meta-predicateI have to create list of n elements for example, do_list(5,L1). should return, L1=[1,2,3,4,5]. This is what I …
list prolog insert-updateGiven the following facts and predicates: sound(time1). sound(time2). sun(time3). relax(X):-sound(X),!,sun(X). relax(_):-sun(_). …
prologI was wondering, I am aware you can use assert to add facts or rules or whatever if you have …
prolog prolog-assert