Created
April 27, 2012 18:01
-
-
Save anonymous/2511366 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
use v6; | |
sub somesub(){ | |
say "i haz a sub"; | |
}; | |
class Foo { | |
has @.a is rw; | |
method add(&c){ @.a.push(&c) } | |
method postcircumfix:<( )>($self: |c) { | |
#since i stripped self into $self, the capture should be empty | |
@.a>>.(|c) | |
} | |
} | |
my $foo = Foo.new; | |
$foo.add(&somesub); | |
$foo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment