2020-11-30

Why is my recursive prolog script not working?

Can anyone help me out with Prolog recursive functions?

I have to type in a recursive input and it should give me true, but it gives me an error and I sitll don´t know how to figure it out

Bob(Food(X)):- Bob(X).
Bob(eat(X)):- Bob(X).
Bob(yummy(X)).

Is what I have and Input Food(Food(eat(yummy)))should result in true

But I get an Error: Unknown procedure: Food/1 (DWIM could not correct goal) this is basically the whole story.



from Recent Questions - Stack Overflow https://ift.tt/3fLUU7b
https://ift.tt/eA8V8J

No comments:

Post a Comment