daily pastebin goal
18%
SHARE
TWEET

[Perl 6] Flattening an array.

cwchen Nov 15th, 2017 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub add($x, $y) {
  2.     $x + $y;
  3. }
  4.  
  5. my @arr = (3, 4);
  6. my $sum = add(|@arr);
  7. $sum == 7 or die "Wrong value";
RAW Paste Data
Top