-
I hope I'm not asking too many questions and that they are good questions. The following code gives the error "error(existence_error(procedure,is_dog/2),is_dog/2)" and I don't understand why. A :- use_module(library(format)).
:- use_module(library(reif)).
dog(comet).
dog(maisey).
dog(oscar).
dog(ramsay).
writeln(X) :- write(X), nl.
is_dog(X, B) :- dog(X) -> B = true; B = false.
:- initialization((
Beings = [mark, comet, tami, maisey, ramsay, oscar],
tpartition(is_dog, Beings, Dogs, NonDogs),
format("dogs include ~w~n", [Dogs]),
format("non-dogs include ~w~n", [NonDogs])
)). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I replaced the |
Beta Was this translation helpful? Give feedback.
I replaced the
:- initialization((
line withrun :-
and deleted the two right parens at the end.Then I ran this with
scryerp -g run reif.pl
and now it works fine.