title: Max int in list ocaml
body: <p>I want to find the max element in a int list.
  The idea is to call <code>find_max</code> only once and let <code>support</code> do the dirty job.
  The function <code>support</code> returns an int, the first value is 0 then when a new <code>max</code> is found it's value is saved, added to the result ,the previous max is changed and it's value deducted from the result.</p>
  <p>This because :</p>
  <pre><code>old_max = x
  result = 0 + old_max
  </code></pre>
  <p>A new max is found :</p>
  <pre><code>new_max= y
  result = result - oldmax + new_max
  </code></pre>
  <p>So I'll save the value of <code>new_max</code> :</p>
  <pre><code>0 + old_max - old_max + new_max = new_max`.
  </code></pre>
  <p>Obviously the code above is explicative, this is my real code :</p>
  <pre><code>let find_max random  = 
    let rec support rlist max =
      if rlist==[] then 0
      else 
        if (List.hd rlist) &gt; max 
        then -max + (List.hd rlist) + support (List.tl rlist) (List.hd rlist)
        else support (List.tl rlist) max ;;
    let return = support random 0 0 ;
    !return;;
  
  let a = [1;2;3];
  print_string &quot;max element in list is : &quot;
  print_int (find_max a);
  print_string &quot;\n&quot;
  </code></pre>
  <p>The error is on line 9 <code>!return;;</code>, syntax error (obviously :/ ) on <code>;;</code></p>