title: How to make an tail recursive function and test it?
body: <p>I would like to make this functions recursive but I don't know where to start.</p>
  <pre><code>let rec rlist r n =
      if n &lt; 1 then []
      else Random.int r :: rlist r (n-1);;
  
  let rec divide = function
      h1::h2::t -&gt; let t1,t2 = divide t in
          h1::t1, h2::t2
      | l -&gt; l,[];;
  
  let rec merge ord (l1,l2) = match l1,l2 with
      [],l | l,[] -&gt; l
      | h1::t1,h2::t2 -&gt; if ord h1 h2
          then h1::merge ord (t1,l2)
          else h2::merge ord (l1,t2);;
  </code></pre>
  <p>Is there any way to test if a function is recursive or not?</p>