title: Dart. Cant' change elements of list
body: <p>I can't change elements of array using anonymous function:</p>
  
  <pre><code>var collection=[0, 1, 2];
    collection.forEach((c)=&gt; c+=1);
    print(collection);
  </code></pre>
  
  <p>This variant doesn't work eithter:</p>
  
  <pre><code>var collection = [0, 1, 2];
  for (var x in collection) {
    x=x+1; 
  }
  print(collection);
  </code></pre>