title: Modify part of the list and then return the updated list
body: <p>I am playing with Java 8 and trying to work with stream(). What I want to achieve is say, I have a list <code>[1,2,3,4]</code>, I want to double the even numbers <code>2</code> and <code>4</code> and then return the list with the updated values. So, I will get <code>[1,4,3,8]</code> as a result. I tried the following but it only returned <code>[4,8]</code>.</p>
  
  <pre><code>List&lt;Integer&gt; myList =
              Arrays.asList(1,2,3,4);
  
      myList = myList
      .stream()
      .filter(n -&gt; n%2==0)
      .map(n -&gt; n*2)
      .collect(Collectors.toList());
  
      System.out.println(myList);
  </code></pre>
  
  <p>Is there a way to do what I want?</p>