I am new to Prolog.
Using this basic database structure, I thought I could query the database to find out
I would not want to change this database setting (if possible). I used the following queries with corresponding undesirable results:
Here I tried to ask: "Who eats fish?"
?- eats(X, fish).
true.
Here I tried to ask: "What do the whales eat?"
?- eats(Whale,X).
X = grass ;
X = banana ;
X = fish.
source
share