Skip to content

Instantly share code, notes, and snippets.

@moritz
Created November 18, 2012 20:27
Show Gist options
  • Save moritz/4107222 to your computer and use it in GitHub Desktop.
Save moritz/4107222 to your computer and use it in GitHub Desktop.
basic sink context working
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