title: F# Adding to a Mutable List
body: <p>I'm writing a console based calculator application for a university project and have run into a bit of an error.</p>
  
  <p>When a user selects an option from the menu (1,2,3,4 etc), they are able to input 2 numbers and either add, subtract, divide or multiply the sum. After each successful sum is solved and displayed, I want them to be added to my List <code>sumHistory</code>.</p>
  
  <p>Here is my code currently, I feel like it should work but I'm obviously running into something small and silly preventing the list from being displayed when told to!</p>
  
  <pre><code>let sumHistory = new List&lt;string&gt;()
  
  match input with
  |"1" -&gt; Console.WriteLine("Please enter 2 integers: ")
          let a= Console.ReadLine()
          let b= Console.ReadLine()
          let A: int = int32 a
          let B: int = int32 b
          let C = (add A B)
          let D = (string A + " + " + string B + " = " + string C)
          Console.WriteLine(D)
          sumHistory.Add(D)      
  |"2" -&gt; Console.WriteLine("Please enter 2 integers: ")
          let a= Console.ReadLine()
          let b= Console.ReadLine()
          let A: int = int32 a
          let B: int = int32 b
          let C = (sub A B)
          let D = (string A + " - " + string B + " = " + string C)
          Console.WriteLine(D)
          sumHistory.Add(D)  
  |"3" -&gt; Console.WriteLine("Please enter 2 integers: ")
          let a= Console.ReadLine()
          let b= Console.ReadLine()
          let A: int = int32 a
          let B: int = int32 b
          let C = (div A B)
          let D = (string A + " / " + string B + " = " + string C)
          Console.WriteLine(D)
          sumHistory.Add(D)  
  |"4" -&gt; Console.WriteLine("Please enter 2 integers: ")
          let a= Console.ReadLine()
          let b= Console.ReadLine()
          let A: int = int32 a
          let B: int = int32 b
          let C = (mul A B)
          let D = (string A + " * " + string B + " = " + string C)
          Console.WriteLine(D)
          sumHistory.Add(D)  
  |"5" -&gt; sumHistory |&gt; Seq.iteri (fun index item -&gt; printfn "%i: %s" index sumHistory.[index])
  |"6" -&gt; let data = ReadInText()
          data.Read()
  </code></pre>