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 ).