title: Printing only print output with SML/NJ
body: <p>I'm trying to use SML/NJ, and I use <code>sml &lt; source.sml</code> to run the code, but it prints out too much information. </p>
  
  <p>For example, this is the <code>source.sml</code>:</p>
  
  <pre><code>fun fac 0 = 1
    | fac n = n * fac (n - 1)
  val r = fac 10 ;
  print(Int.toString(r));
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>Standard ML of New Jersey v110.77 [built: Tue Mar 10 07:03:24 2015]
  - val fac = fn : int -&gt; int
  val r = 3628800 : int
  [autoloading]
  [library $SMLNJ-BASIS/basis.cm is stable]
  [autoloading done]
  3628800val it = () : unit
  </code></pre>
  
  <p>From <a href="https://stackoverflow.com/questions/1265171/suppress-val-it-output-in-standard-ml">Suppress &quot;val it&quot; output in Standard ML</a>, <a href="https://stackoverflow.com/questions/8186848/how-to-disable-smlnj-warnings">How to disable SMLNJ warnings?</a>, and <a href="https://stackoverflow.com/questions/8434592/smlnj-want-to-remove-val-it-unit-from-every-print-statement-execution">SMLNJ want to remove &quot;val it = () : unit&quot; from every print statement execution</a>, I got some hints how to suppress them. </p>
  
  <p>I execute <code>CM_VERBOSE=false sml &lt; $filename</code> and added one line of <code>Control.Print.out := {say=fn _=&gt;(), flush=fn()=&gt;()};</code> in the code, but I still have some message:</p>
  
  <pre><code>Standard ML of New Jersey v110.77 [built: Tue Mar 10 07:03:24 2015]
  - 3628800
  </code></pre>
  
  <p>How can I print out only the output? </p>