I am trying to write simple case in mod function of two peano's number in prolog , put some case it give me wrong answer I don't know what is the problem with my code
simple case is if C smaller than D return C
mod(C,D,F):- smaller(C,D) -> mod(C,D,C).
I don't have output
thank you.
By simply doing this:-
It will return C if
smaller
predicate returnstrue
, that is when C is smaller than D.