title: Replace for loop with java 8 foreach for updating values
body: <p>I'm looking to replace the following for loop with an elegant java 8 stream or lambda solution. Is there anything concise and efficient?</p>
  
  <pre><code>    public static void main(String[] args) {
          ArrayList&lt;Integer&gt; myList = new ArrayList&lt;&gt;( Arrays.asList( 10,-3,5));
  
          // add 1/2 of previous element to each element
          for(int i =1 ;i &lt; myList.size();  ++i )
              myList.set(i, myList.get(i)+myList.get(i-1)/2);
  
          // myList.skip(1).forEach( e -&gt; e + prevE/2 );  // looking for something in this spirit
      }
  </code></pre>