title: Trouble with printing a string in OCaml
body: <p>The code compiles without the print statement. However with the print statement I get the error on that line that <code>Error: This expression has type unit but an expression was expected of type int</code>. I've also tried <code>print_string numDigits</code></p>
  
  <pre><code>let rec rev_int num =
    if num / 10 == 0 then
      num
    else
      let temp = num mod 10 in
      let numDigits = string_of_int num in
      Printf.printf "%s" numDigits
  
      let num = (num - temp) / 10 in
      temp * (10 * String.length(numDigits)) + rev_int num;;
  </code></pre>