title: Generating Fibonacci series in F#
body: <p>I'm just starting to learn F# using VS2010 and below is my first attempt at generating the Fibonacci series.  What I'm trying to do is to build a list of all numbers less than 400.</p>
  
  <pre><code>let fabList = 
      let l =  [1;2;]
      let mutable a = 1
      let mutable b = 2
      while l.Tail &lt; 400 do
          let c = a + b
          l.Add(c)
          let a = b
          let b = c
  </code></pre>
  
  <p>My first problem is that on the last statement, I'm getting an error message "Incomplete structured construct at or before this point in expression" on the last line.  I don't understand what I'm doing wrong here. </p>
  
  <p>While this seems to be an obvious way to build the list in a fairly efficient way (from a c++/C# programmer), from what little I know of f#, this doesn't seem to feel to be the right way to do the program.  Am I correct in this feeling?</p>