title: Funtional way to find empty intervals in a list of tuples with start and end times
body: <p>Say I have a list of tuples with start and end times:</p>
  
  <pre><code>List((1,10), (2,11), (3,11), (13,14))
  </code></pre>
  
  <p>The only relaxation is that start times are ascending</p>
  
  <p>I expect the following output:</p>
  
  <pre><code>List((0,1), (11,13))
  </code></pre>
  
  <p>The procedural implementation is fairly straightforward, however I wouldn't have a clue to do this (idiomatically) functional. </p>
  
  <p>A scala-for-yield loop seems to be a bad fit, since the result would be of the same size as the input. Whereas a reduce/fold would restrict me to have only one tuple as the answer.</p>