title: How to print function return value in Ocaml
body: <p>How to print the integer type return value of a recursive function in Ocaml.I want to find factorial of a number.I use the following code.But it shows error</p>
  
  <pre><code>let rec factorial x = 
      if (0 &gt; x) then (raise Exit) 
      else
          match x with
              | 0 -&gt; 1
              | n -&gt; (n * (factorial (n - 1)))
          print_int (n * (factorial (n - 1)));;
  </code></pre>
  
  <p>The following error shows when trying to run it:</p>
  
  <p><code>This expression is not a function; it cannot be applied</code></p>