title: Using WriteLine to prints out in file
body: <p>I used the following code, to write a <code>mylist</code> in a <code>*.txt</code> file.</p>
  
  <pre><code>let outFile = new StreamWriter("4.txt")
  let writeNumbersInFile (numbersToupleList)=function
      |[] -&gt; ()
      |head::tail -&gt; outFile.WriteLine(string (head))
  
  
  
  let mylist= [1;2;3;4]
  writeNumbersInFile mylist
  outFile.Close()
  </code></pre>
  
  <p>This code succesfully creates a <code>4.txt</code>, but when I open it, there is nothing there, however i expect to see </p>
  
  <pre><code>1
  2
  3
  4
  </code></pre>