Just to supplement Daniel's well-explained answer (+1) for your specific case, consider:
tall(a).
Prolog will look at the first match, which is through:
tall(X) :- skinny(X) ; eatless(X).
This will succeed because skinny(a)
will succeed. However, there's a disjunction ;
leaving a choice point for Prolog that it hasn't explored yet. Because skinny(a)
succeeds and the choice point is pending, you get true
but prompted to seek more. Prolog then backtracks to the choice point and tries to satisfy eatless(a)
but fails. Thus, you get:
?- tall(a).
true ; % because `skinny(a)` succeeded
false. % because `eatless(a)` failed
Taking another example:
tall(d).
Again, this matches the tall/1
predicate, but this time, skinny(d)
fails and prolog moves right on (due to the disjunction) to eatless(d)
which succeeds. However, there are no more choice points after that success, so you get:
?- tall(d).
true. % There were no choice points available after success