Prolog. Structure(complex term) vs predicate, i dont really get the difference
问题 I'm new to prolog and i cant seem to understand the difference between a structure and a predicate. Is there really any difference? While digging around i found that some people consider f(X):-a(X) to be a predicate and some consider jealous(X,Y):-loves(X,Z), loves(Y,Z) to be a structure (or a complex term). They look pretty much the same to me. Somebody care to explain? 回答1: In Prolog, a term is a constant, atom, variable, or compound term . A compound term consists of a functor with 1 or