I am trying to compile and query this code:
got('no').
inMap(X,Y):- print("From inMap").
mask(1,3).
doctor(2,1).
verify(X,Y):-
(inMap(X,Y), ((\+(got('mask'); got('vaccine')),farCovid(X,Y)); True),
(print(X), print(Y); True),
(doctor(X,Y), print(X), print(Y); True)).
When my query is: ?- verify(2,1).
It returns:
"From inMap""From farCovid"2121
true .
But when my query is: ?- verify(1,1).
It returns:
"From inMap""From farCovid"11
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [10] verify(1,1)
ERROR: [9] <user>
Can somebody explain to me what is wrong here please, wasn't it supposed to pass in (1,1) in the second query to doctor(X,Y) and return false?
Thanks in advance!