title: How to gracefully close File/Stream/Seq in FSharp when grabbing multiple lines?
body: <p>I'm trying to write a class in FSharp to lazily read in lines from a text file and convert them into the appropriate Record types.  My records are multiple lines long, so I use Seq.take function to pull off as many lines as I need at a time - in this case 4.</p>
  
  <pre><code>let readLines = seq {
      while not inputStream.EndOfStream do
          yield inputStream.ReadLine()
      inputStream.Close()
  }
  
  let lineQuartet readLines = Seq.take 4 readLines
  </code></pre>
  
  <p>The problem I'm having is that when I run out of lines, instead of ending there, I'm getting empty seqs which cause the reader to crash.</p>
  
  <p>What is the best way to handle this?</p>