title: Getting the minimum value of a list
body: <p>I am trying to find the minimum value of a list (as a learning experience, so without <code>min</code>).</p>
  
  <p>My approach is the following:</p>
  
  <pre><code>minimo([X], X).
  minimo([X,Y|Tail], N):-
      (X &gt; Y, minimo([Y,Tail], Y));
      (X &lt;= Y, minimo([X,Tail], X)).
  </code></pre>
  
  <p>This gives me the following error:</p>
  
  <blockquote>
    <p>Syntax error: Operator expected</p>
  </blockquote>
  
  <p>So my questions are:</p>
  
  <ul>
  <li>What is causing the syntax error?</li>
  <li>I will try it myself once that is fixed if it actually gives the correct value back, but would this actually be a correct approach?</li>
  </ul>
  
  <p>Thanks in advance.</p>