Skip to content

Instantly share code, notes, and snippets.

@kwalrath
Created May 3, 2018 23:51
Show Gist options
  • Save kwalrath/368c0634feb20f47011f435d911456c2 to your computer and use it in GitHub Desktop.
Save kwalrath/368c0634feb20f47011f435d911456c2 to your computer and use it in GitHub Desktop.
Java-to-Dart codelab: Scream example - functional code
String scream(int length) => "A${'a' * length}h!";
main() {
final values = [1, 2, 3, 5, 10, 50];
values.map(scream).forEach(print);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment