Advertisement
cwchen

[Perl 6] Flattening an array.

Nov 15th, 2017
3,397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.11 KB | None | 0 0
  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";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement