title: Mapping over a list in Java
body: <p>In Java 8 I can map over streams with the <code>map</code> method, e.g.</p>
  
  <pre><code>Stream.of("Hello", "world").map(s -&gt; s.length())
  </code></pre>
  
  <p>gives me a stream containing the integers <code>[5, 5]</code>. I am trying to do the same with lists. I have come up with</p>
  
  <pre><code>List&lt;String&gt; list = ...
  
  list.stream().map(s -&gt; s.length()).collect(Collectors.toList())
  </code></pre>
  
  <p>This works but is rather verbose. Is there a more concise solution? Ideally, there would be a similar <code>map</code> method for lists, but I haven't found any. So,  are there any alternatives?</p>