Skip to content

Commit

Permalink
more metaop
Browse files Browse the repository at this point in the history
  • Loading branch information
ash committed Dec 27, 2016
1 parent c2c71d0 commit 361a0fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions metaop5.pl
@@ -0,0 +1 @@
say [*] 1..5;
11 changes: 11 additions & 0 deletions metaop6.pl
@@ -0,0 +1,11 @@
sub infix:<pairsum>($a, $b) {
state $sum = 0;
say "[$a + $b]";
$sum += $a + $b;
#return $sum;
}

#say [pairsum] 1, 2, 3;
#say [pairsum] 1, 2, 3;

say [pairsum] 1, 3, 5;

0 comments on commit 361a0fc

Please sign in to comment.