beginner question

Luca Ciciriello <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Hi All.
I'm moving the first steps in the world of logic programming and I've installed on MacOS X 10.6.3 the GNU prolog 1.3.1 compiler. 

To teach myself in Prolog I'm reading the book "Learn Prolog Now". In this book i've found some simple knowledge base and i've used the gprolog to test some example.

I've created the file test2.pl with the following content:

listensToMusic(mia). 
happy(yolanda). 
playsAirGuitar(mia) :- listensToMusic(mia). 
playsAirGuitar(yolanda) :- listensToMusic(yolanda). 
listensToMusic(yolanda):- happy(yolanda).

and I've loaded it in to interpreter typing [test2].

now the book is telling me that if I type at the prompt the query:

?- playsAirGuitar(yolanda).

the result i obtain is "yes".

My problem is that the result I obtain is a big "no".

Now, as student, I'm a bit confused.
Who is right and who is wrong?
The book or the interpreter?

Thanks in advance for any help.

Luca.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.