Disjunction(逻辑 OR)隐式与 explict
Prolog 按照出现的顺序尝试谓词的替代子句:
likes(alice, music).
likes(bob, hiking).
// Either alice likes music, or bob likes hiking will succeed.
析取(OR)运算符 ;
可用于在一个规则中表达:
likes(P,Q) :-
( P = alice , Q = music ) ; ( P = bob , Q = hiking ).