Skip to content

Instantly share code, notes, and snippets.

@masazdream
Created November 17, 2013 12:40
Show Gist options
  • Select an option

  • Save masazdream/7512865 to your computer and use it in GitHub Desktop.

Select an option

Save masazdream/7512865 to your computer and use it in GitHub Desktop.
void print2(var v) { print(v * 2); }
main() {
var vs = [1, 7, 3, 2, 0, 5, 0, 4];
print('--1--');
vs.forEach(print);
print('--2--');
vs.forEach(print2);
print('--3--');
vs.forEach( (a) => print(a*a) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment