title: What does Expression.Reduce() do?
body: <p>I've been working with expression trees for a few days now and I'm curious to know what Expression.Reduce() does. The <a href="http://msdn.microsoft.com/en-us/library/system.linq.expressions.expression.reduce(VS.100).aspx" rel="noreferrer">msdn documentation</a> is not very helpful as it only states that it "reduces" the expression. Just in case, I tried an example (see below) to check if this method included mathematical reduction, but this doesn't seem to be the case.</p>
  
  <p>Does anyone know what this method does and is it possible to provide a quick example showing it in action? Any good resources out there?</p>
  
  <pre><code>static void Main(string[] args)
  {
      Expression&lt;Func&lt;double, double&gt;&gt; func = x =&gt; (x + x + x) + Math.Exp(x + x + x);
      Console.WriteLine(func);
      Expression r_func = func.Reduce();
      Console.WriteLine(r_func); // This prints out the same as Console.WriteLine(func)
  }
  </code></pre>