SHARE
TWEET

Untitled

a guest Aug 14th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String scream(int length) => "A${"a" * length}h!";
  2. main() {
  3.   var values = [1, 2, 3, 4, 10];
  4. //   Imperative way
  5. //   for (int length in values){
  6. //     print(scream(length));
  7. //   }
  8.  
  9. //   Functional way
  10. //   values.map(scream).forEach(print);
  11.   values.skip(1).take(3).map(scream).forEach(print);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top