Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env raku
- use v6.d;
- ## let get the right result
- say "\e[0;32m just one listt\e[0m";
- say ([+](1,2,3,5,6,7)).fmt("[+](1,2,3,5,6,7) is %s");
- say "\e[0;32m testing just flat\e[0m";
- say [+]((1..3,(5..7)).flat);
- say [+]((1...3,(5...7)).flat); #6
- say [+]((1..3,(5...7)).flat);
- say [+]((1...3,(5..7)).flat);
- say "\e[0;32m testing with just |\e[0m";
- say [+]((1..3,|(5..7))); #24
- say [+]((1...3,|(5...7))); #6
- say [+]((1..3,|(5...7)));
- say [+]((1...3,|(5..7)));
- say "\e[0;32m testing with | and flat\e[0m";
- say [+]((1..3,|(5..7))).flat; #24
- say [+]((1...3,|(5...7))).flat; #6
- say [+]((1..3,|(5...7))).flat;
- say [+]((1...3,|(5..7))).flat;
Advertisement
Add Comment
Please, Sign In to add comment