-
-
Save polettix/9ec1abaf955eb335c15baec45f132208 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
-> ;; $_? is raw = OUTER::<$_> { #`(Block|69979400) ... } | |
this is baz | |
-> ;; $_? is raw = OUTER::<$_> { #`(Block|69986960) ... } | |
this is bar | |
-> ;; $_? is raw = OUTER::<$_> { #`(Block|69987104) ... } | |
this is foz | |
(Callable) | |
No such method 'CALL-ME' for invocant of type 'Callable' | |
in method run at attint.raku line 19 | |
in block <unit> at attint.raku line 22 |
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
#!/usr/bin/env raku | |
use v6; | |
class Foo { | |
has &!foo = { put 'this is foo' }; | |
has &!bar; | |
has &!baz; | |
has &!foz = { put 'this is foz' }; | |
method BUILD (:&!foo, :&!bar = { put 'this is bar' }, :&!baz) { | |
&!baz //= { put 'this is baz' } | |
} | |
method run { | |
&!baz.say; | |
&!baz(); | |
&!bar.say; | |
&!bar(); | |
&!foz.say; | |
&!foz(); | |
&!foo.say; | |
&!foo(); | |
} | |
} | |
Foo.new.run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment