title: OCaml : How to get a parameter from a type?
body: <p>This is really simple but I can't find the answer to it anywhere.</p>
  
  <p>Let's say I created a new <code>type student = string * int</code> which is a tuple of a student's name and his score on a test.</p>
  
  <p>Then a list of student is passed to a function, and I have to find the average score of the class (or the list).</p>
  
  <pre><code>let blah (class : student list) : float =
  match class with
  [] -&gt; [] 
  | hd :: tl -&gt; hd ??????
  </code></pre>
  
  <p>So I start a standard pattern matching, get one element of the list (aka a student) but how exactly do I extract the test score? 
  I feel like it's something really obvious and elementary  but I've only previously coded with ints, strings, int lists, int list list, etc.. where hd is specifically the piece of information you want. </p>