title: Getting distance between two lists in OCaml
body: <p>Let's say we have two lists, [3;4;5] and [1;2;3], how can I get the distance of 12, which is found by subtracting the second list from the first, and squaring. So (3-1)^2 + (4-2)^2 + (5-3)^2. I currently have this to square it:</p>
  
  <pre><code>List.map (List.map (fun x -&gt; x*x)) [[1; 2]; [2; 3]];;
  </code></pre>
  
  <p>But how can I get it to subtract and add them all together? The above sequence only returns [[1;4];[4;9]].</p>
  
  <p>Thanks.</p>