title: Two clause definition to find the maximum number on a list
body: <p>How would I write a two clause recursive definition to find the maximum value in a list.   So far I have written this:</p>
  
  <pre><code> max(L,M):-  
  
   max([H|T],M):-
  
  max(T,H,M).
  max([],M,M).
  max([H|T],Y,M):-
     H =&lt; Y,
     max(T,Y,M).
  max([H|T],Y,M):-
     H &gt; Y,
     max(T,H,M).
  </code></pre>
  
  <p>This doesn't work, it says there is a syntax error which I can't quite see, and I know it isn't two clause either. Anyone know how I could simplify it to make it two clause?</p>