Пишу экспертную систему. Точно знаю где ошибка но не могу понять что не так.
vine :- catch(Make),
write('your '),
write(Make),
write(' order is ready'),
nl.
undo.
input(Question) :-
write('would you like a '),
write(Question),
write('?'),
read(output),
nl,
((output == yes; output == y)
->
assert(yes(Question));
assert(no(Question)), fail).
:- dynamic yes/1,no/1.
verify(Order) :-
(yes(Order) :-
->
true;
(no(Order)
->
fail;
input(Order))).
undo :- retract(yes(_)),fail.
undo :- retract(no(_)),fail.
undo.
/*Hypothesis*/
grasp(lenova) :- lenova, !.
grasp(apple) :- apple, !.
grasp(empty_basket).
/*knowledge*/
lenova :-
verify(laptop),
verify(lenova),
verify(black_color),
verify(big_screen).
lenova :-
verify(laptop),
verify(lenova),
verify(black_color),
verify(small_screen).
lenova :-
verify(laptop),
verify(lenova),
verify(grey_color),
verify(big_screen).
lenova :-
verify(laptop),
verify(lenova),
verify(grey_color),
verify(small_screen).
apple :-
verify(macbook),
verify(white_color),
verify(large_screen).
apple :-
verify(macbook),
verify(white_color),
verify(mini_screen).
apple :-
verify(macbook),
verify(pink_color),
verify(large_screen).
apple :-
verify(macbook),
verify(pink_color),
verify(mini_screen).
apple :-
verify(macbook),
verify(white_color),
verify(large_screen).
Не нравится ему именно этот символ ->
по какой причине такое может быть?