title: Observable.Where with async predicate
body: <p>Is there a convenient way to use an async function as the predicate of a <code>Where</code> operator on an observable? </p>
  
  <p>For example, if I have a nice tidy but possibly long-running function defined like this:</p>
  
  <pre><code>Task&lt;int&gt; Rank(object item);
  </code></pre>
  
  <p>Is there a trick to passing it to <code>Where</code> and maintaining the asynchronous execution? As in:</p>
  
  <pre><code>myObservable.Where(async item =&gt; (await Rank(item)) &gt; 5)
  </code></pre>
  
  <p>In the past, when I've needed to do this, I've resorted to using <code>SelectMany</code> and projecting those results into a new type along with the original value and then doing the filtering based on that.</p>
  
  <pre><code>myObservable.SelectMany(async item =&gt; new 
    {
      ShouldInclude = (await Rank(item)) &gt; 5,
      Item = item
    })
    .Where(o =&gt; o.ShouldInclude)
    .Select(o =&gt; o.Item);
  </code></pre>
  
  <p>I think that's terribly unreadable, though and I feel like there must be a cleaner way.</p>