Guest User

| or flat

a guest
Aug 25th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.65 KB | None | 0 0
  1. #!/usr/bin/env raku
  2. use v6.d;
  3. ## let get the right result
  4. say "\e[0;32m just one listt\e[0m";
  5. say ([+](1,2,3,5,6,7)).fmt("[+](1,2,3,5,6,7) is %s");
  6.  
  7. say "\e[0;32m testing just flat\e[0m";
  8. say [+]((1..3,(5..7)).flat);
  9. say [+]((1...3,(5...7)).flat); #6
  10. say [+]((1..3,(5...7)).flat);
  11. say [+]((1...3,(5..7)).flat);
  12.  
  13. say "\e[0;32m testing with just |\e[0m";
  14. say [+]((1..3,|(5..7))); #24
  15. say [+]((1...3,|(5...7))); #6
  16. say [+]((1..3,|(5...7)));
  17. say [+]((1...3,|(5..7)));
  18.  
  19. say "\e[0;32m testing with | and flat\e[0m";
  20. say [+]((1..3,|(5..7))).flat; #24
  21. say [+]((1...3,|(5...7))).flat; #6
  22. say [+]((1..3,|(5...7))).flat;
  23. say [+]((1...3,|(5..7))).flat;
Advertisement
Add Comment
Please, Sign In to add comment