Hello to all, i have define a recursive rule but the result seems incorrect.
customer(peter,bank(maybank),customertype(personal),
citizen(malaysian),age(62),credit(50000),
income(3000),property(car) ).
isseniorcitizen(X) :- customer(X, bank(_),customertype(_),
citizen(malaysian),age(Age),credit(_),
income(_),property(_)),
Age >= 60.
lowerinterest(Senior) :- isseniorcitizen(Senior).
isseniorcitizen(peter).
But the SWI-Prolog return X = peter; X = peter.
Why it return two times rather once ?
Please help.
Thanks.