title: Java mapToInt vs Reduce with map
body: <p>I've been reading up on reduce and have just found out that there is a 3 argument version that can essentially perform a map reduce like this:</p>
  
  <pre><code>String[] strarr = {"abc", "defg", "vwxyz"};
  
  System.out.println(Arrays.stream(strarr).reduce(0, (l, s) -&gt; l + s.length(), (s1, s2) -&gt; s1 + s2));
  </code></pre>
  
  <p>However I can't see the advantage of this over a mapToInt with a reduce.</p>
  
  <pre><code>System.out.println(Arrays.stream(strarr).mapToInt(s -&gt; s.length()).reduce(0, (s1, s2) -&gt; s1 + s2));
  </code></pre>
  
  <p>Both produce the correct answer of 12, and both appear to work fine in parallel.</p>
  
  <p>Is one better than the other, and if so, why?</p>