Last active
August 29, 2015 14:03
-
-
Save dwarring/13cdf1f047b3e085f4c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub foo {say 'outer foo'} | |
sub infix:<bar>($a,$b) {say "outer bar {$a + $b}" } | |
sub infix:<baz>($a,$b) {say "outer baz {$a * $b}" } | |
foo(); | |
2 bar 3; | |
2 baz 3; | |
say; | |
{ | |
sub foo { say 'inner foo' } | |
sub infix:<bar>($a,$b) {say "inner bar {$a + $b}" } | |
sub infix:<baz>($a,$b) is tighter(&infix:<*>) {say "inner baz {$a * $b}" } | |
foo(); | |
2 bar 3; | |
2 baz 3; | |
say; | |
} | |
foo(); | |
2 bar 3; | |
2 baz 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment