title: Java8 function type for `(a,b) -> a+b`
body: <p>Trying to test Java8 lambda, but the type is confusing:</p>
  
  <pre><code>import java.util.function.ToIntBiFunction;
  import java.util.stream.IntStream;
  
  public class Test {
      public static void main(String... args) {
  
      int sum1 = 0;
      for (int n = 0; n &lt; 10; n++) {
          sum1 += n;
         }
  
  
      ToIntBiFunction&lt;Integer, Integer&gt; add = (a, b) -&gt; a + b;  
      int sum2 = IntStream.range(0, 10)
                          .reduce(0, add); //error here
  
  
       System.out.println(""+sum1);
       System.out.println(""+sum2);
  
     }
  }
  </code></pre>
  
  <p>Test.java:15: error: incompatible types: ToIntBiFunction cannot be converted to IntBinaryOperator
                          .reduce(0, add);</p>
  
  <p>What is the most generic way to define the function </p>
  
  <p><code>(a,b) -&gt; a+b</code></p>
  
  <p>Thanks.</p>