/* if_then_else(P,Q,R) :- Either P and Q, or not P and R. */ if_then_else(P,Q,R) :- P, !, Q. if_then_else(P,Q,R) :- R. % Program 11.10 If-then-else statement