Skip to content

Instantly share code, notes, and snippets.

@Sfshaza
Last active May 3, 2018 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sfshaza/db5e06ec058a30f0e3edc6ff47093af5 to your computer and use it in GitHub Desktop.
Save Sfshaza/db5e06ec058a30f0e3edc6ff47093af5 to your computer and use it in GitHub Desktop.
Java-to-Dart codelab: Scream example - functional code using Iterables
String scream(int length) {
return "A${'a' * length}h!";
}
main() {
var values = [1, 2, 3, 5, 10, 50];
values.skip(1).take(3).map(scream).forEach(print);
}
@kwalrath
Copy link

kwalrath commented May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment