title: Returning list that satisfy conditions
body: <p>I have two lists filled with <code>(x, y)</code> data points; one of the lists being the main list and the other being a list I want to compare against.</p>
  
  <p>So for example, in the <strong>main</strong> list I try to find "gaps" in the data; say I'm looking at two <code>x</code> data points <code>x1 = 21</code> and <code>x2 = 24</code>. The difference between those two points is greater than <code>deltaX = 1</code>. So what I'd like to do, is look through the <strong>second</strong> list, and find all data points between <code>x1 = 21</code> and <code>x2 = 24</code> to "fill in the gap".</p>
  
  <p>I have something like this:</p>
  
  <pre><code>double diffX = Math.Abs(datapoints1[i + 1].X - datapoints1[i].X);
  
  if (diffX &gt; deltaX)
  {
      datapoints1.AddRange(LookBetween(datapoints1[i + 1].X, datapoints1[i].X);
  }
  .
  .
  .
  private IEnumerable&lt;PointXY&gt; LookBetween(double upperLimit, double lowerLimit)
  {
      return datapoints2.Where(x =&gt; x.X &lt; upperLimit &amp;&amp; x.X &gt; lowerLimit);
  }
  </code></pre>
  
  <p><code>LookBetween</code> seems to return a boolean because nothing gets added to the main list. How can I get it to return a list of the <code>x, y</code> values that match the criteria based on the gap of <code>x</code>?</p>