daily pastebin goal
5%
SHARE
TWEET

[Perl 6] Flattening an array.

cwchen Nov 15th, 2017 104 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
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
 
Top