title: Are the results of `IncrementalValueProvider` extensions cached and compared?
body: <p><code>SyntaxValueProvider.CreateSyntaxProvider</code> takes two <code>Func</code> arguments: a <em>predicate</em> that filters the syntax elements, and a <em>transform</em> that returns the interesting details from the syntax context. The result sets from each <code>Func</code> are cached and compared with previous invocations to avoid unnecessary regeneration.</p>
  <p><code>CreateSyntaxProvider</code> returns an <code>IncrementalValuesProvider</code>, which has several extension methods that look like LINQ but aren't. <strong>Are the result sets from these extensions also cached and compared, potentially preventing regeneration if their output is unchanged?</strong></p>
  <p>In many tutorials, the transform returns either the interesting details from the syntax context, or null. The nulls are then removed with a pseudo-LINQ <code>Where</code>:</p>
  <pre><code>var provider = context.SyntaxProvider.CreateSyntaxProvider(
          (syntax, _) =&gt; Predicate(syntax), 
          (syntaxContext, _) =&gt; DetailsOrNull(syntaxContext))
      .Where(details =&gt; details != null);
  initContext.RegisterSourceOutput(provider, (spc, details) =&gt; Generate(spc, details));
  </code></pre>
  <p>What I'm getting at with this question is whether the following would be equivalent in terms of preventing <code>Generate</code> from being called:</p>
  <pre><code>var provider = context.SyntaxProvider.CreateSyntaxProvider(
          (syntax, _) =&gt; Predicate(syntax), 
          (syntaxContext, _) =&gt; syntaxContext
      .Where(syntaxContext =&gt; IsInteresting(syntaxContext))
      .Select((syntaxContext, _) =&gt; Details(syntaxContext));
  initContext.RegisterSourceOutput(provider, (spc, details) =&gt; Generate(spc, details));
  </code></pre>
  <p>This would be less efficient if <code>IsInteresting</code> and <code>Details</code> extract the same information from <code>syntaxContext</code>. But if they don't duplicate work, is there any reason to do it the first way?</p>