I'm kind of new to prolog and logical programming in general. Can anyone tell me the difference between these two set of prolog rules?
number_of_parents(adam,0):-!.
number_of_parents(eve,0):-!.
number_of_parents(X,2).number_of_parents2(adam,N):-!, N=0.
number_of_parents2(eve,N):-!, N=0.
number_of_parents2(X,2).
To me they pretty much represent the same set of logic. But, why does it return "yes" if I call "number_of_parents(eve,2)."? I did a trace on it, but am still having a hard time figuring it out. A step by step explanation is much appreciated. Thanks.