title: Confused on accessing data in a list of tuples F#
body: <pre><code>//Return a tuple from a text file:
  let ExtractFromLine (line:string) =
   let strings = line.Split('\t') //data members are spaced by tab
   let strlist = Array.toList(strings) //each data member is now a list of str
   let year = System.Int32.Parse(strlist.Head) //year is first in file, so Head
   let values = List.map System.Double.Parse strlist.Tail //tail are all values
   let average = List.average values //not part of text file
   let min = List.min values //not part of text file
   let max = List.max values //not part of text file
   (year, values, average, min, max) //return tuple with all info
  
  //----------
  let rec createList fileline =
   if fileline = [] then
    []
   else 
    let (year, values, average, min, max) = ExtractFromLine fileline.Head
    let l = (year, values, average, min, max) :: createList fileline.Tail
    l
  
  //------------
  let main argv =
   let file = ReadFile "data.txt"
  
   let biglist = createList file //recursive function to make a list of tuples
   printfn"%A" biglist //This prints the year, all values, average, min, and max for each tuple created
  </code></pre>
  
  <p>I now have a giant list of tuples with all of the information that I need.
  <strong>Have I retained the possibility of accessing all elements inside and performing calculations on them?</strong> I program in C++, and the solution is doable in that language, but F# is so much more powerful in my opinion. I'm sure its possible, I'm just missing the basics.</p>
  
  <p>For example, <strong>how do I print the average of all the values for all years</strong>?
  I'm thinking of a for loop, but I'm not sure how to iterate.</p>
  
  <pre><code>for(all tuples in biglist)
  printfn"%A:%A" tuple.year tuple.average
  </code></pre>
  
  <p>It's wrong obviously, but I think you guys understand what I'm trying to do.</p>
  
  <p>The above question involves pulling data from one tuple at a time across the list. <strong>What if I wanted to print the largest average</strong>?This would involve accessing each tuple's average data member and comparing them to return the largest one. Do I have to create another list containing these averages?</p>
  
  <p>I learned about fst and snd but I had a hard time applying it to this example.
  You don't have to answer all questions if it is too much, but any help is greatly appreciated as I start out in this language, thank you</p>