Last active
May 3, 2018 23:57
-
-
Save Sfshaza/db5e06ec058a30f0e3edc6ff47093af5 to your computer and use it in GitHub Desktop.
Java-to-Dart codelab: Scream example - functional code using Iterables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will be replaced by https://gist.github.com/kwalrath/bd0d627c9af8d264c2b3dde7c0939375.