title: Compound boolean expressions in Prolog
body: <p>In Prolog, how do you implement compound logical predicates like (A and B) or (C and D)?</p>
  
  <p>This may seem like a simple question but many approachable online tutorials are not detailed enough on boolean expressions.  I assume you can't just write:</p>
  
  <pre><code>test(A, B, C, D) :- cond(A), cond(B); cond(C), cond(D).
  </code></pre>
  
  <p>so how would you do it?</p>