title: Forward declaration in SML/NJ (A call B , B call A)
body: <p>Consider - <code>fun A()</code> call <code>fun B()</code> and vise versa and I implement <code>A()</code> before <code>B()</code>, like this:</p>
  
  <pre><code>fun A() = 
    B() ; 
  
  fun B() =
    A() ; 
  </code></pre>
  
  <p>In such case the SML/NJ interpreter prompts  - </p>
  
  <pre><code> Error: unbound variable or c onstructor: B
  </code></pre>
  
  <p>How do I solve this? Maybe something like <em>forward declaration</em>? </p>
  
  <p>(leave it that it cause infinite loop)</p>