title: How do I get an IntStream from a List<Integer>?
body: <p>I can think of two ways:</p>
  
  <pre><code>public static IntStream foo(List&lt;Integer&gt; list)
  {
      return list.stream().mapToInt(Integer::valueOf);
  }
  
  public static IntStream bar(List&lt;Integer&gt; list)
  {
      return list.stream().mapToInt(x -&gt; x);
  }
  </code></pre>
  
  <p>What is the idiomatic way? Maybe there is already a library function that does exactly what I want?</p>