Created
November 18, 2012 20:27
-
-
Save moritz/4107222 to your computer and use it in GitHub Desktop.
basic sink context working
This file contains hidden or 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
my $SV = 0; | |
class A { | |
method sink() { | |
say "sunk $SV"; | |
} | |
} | |
sub f($x) { $SV = $x; A }; | |
my $x = do { | |
f(1); | |
f(2); | |
f(3); | |
}; | |
# ./perl6 --sink sink-test.pl | |
# sunk 1 | |
# sunk 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment