I have encountered a problem with my teacher in the Prolog class. My professor says that we can make a resolution with the following program
mag(paris,mag_a). mag(paris,mag_b). mag(lyon,mag_c). mag(lyon,mag_d). liste(M):-mag(V,M),write(M),write( situe_a ),write(V),nl,fail. liste(M):-write(fin liste).
served by the following goal:
and that gives the following result:
mag_a situe a paris mag_b situe a paris mag_c situe a lyon mag_d situe a lyon fin liste true.
But, in swish.swi, the software that compiles Prolog online says that it is not possible to do that:
So, who can I believe?