title: OCaml mod function returns different result compared with %
body: <p>The modulo function in <strong>OCaml</strong> <code>mod</code> return results different when compared with the modulo operator in <strong>python</strong>.</p>
  
  <p><strong>OCaml:</strong></p>
  
  <pre><code># -1 mod 4
  - : int = -1
  </code></pre>
  
  <p><strong>Python:</strong></p>
  
  <pre><code>&gt;&gt;&gt; -1 % 4
  3
  </code></pre>
  
  <p>Why are the result different?.</p>
  
  <p>Is there any standard module function that operate as <code>%</code> in OCaml?.</p>