title: How to exit a program?
body: <p>If the input argument are not as expected I want to exit the program. How should I achieve that? Below is my attempt.</p>
  
  <pre><code>let () =
    if ((Array.length Sys.argv) - 1) &lt;&gt; 2 then                                                                                                                                              
      exit 0 ; ()                                                                                                                                                                           
    else
      ()
  </code></pre>
  
  <p>Thanks.</p>