title: How to convert a data array to a record using idiomatic F#
body: <p>I'm trying to create a communication library that interacts with hardware. The protocol is made up of byte arrays with a header (source/destination address, command number, length) and a command specific payload. I'm creating Record Types for each of the commands to make them more user friendly.</p>
  
  <p>Is there a more idiomatic way of converting an array to a record than</p>
  
  <pre><code>let data = [0;1]
  type Rec = {
      A : int
      B : int
  }
  
  let convert d =
    {
      A = d.[0]
      B = d.[1]
    }
  </code></pre>
  
  <p>This can become very tedious when the records are much larger.</p>