Skip to content

Instantly share code, notes, and snippets.

@polettix
Created June 26, 2021 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polettix/16ffed140530e4f100c1786d34912dcb to your computer and use it in GitHub Desktop.
Save polettix/16ffed140530e4f100c1786d34912dcb to your computer and use it in GitHub Desktop.
$ raku --version
Welcome to ๐‘๐š๐ค๐ฎ๐๐จโ„ข v2021.06.
Implementing the ๐‘๐š๐ค๐ฎโ„ข programming language v6.d.
Built on MoarVM version 2021.06.
$ raku attint.raku
-> ;; $_? is raw = OUTER::<$_> { #`(Block|82273360) ... }
this is baz
-> ;; $_? is raw = OUTER::<$_> { #`(Block|82280920) ... }
this is bar
(Callable)
No such method 'CALL-ME' for invocant of type 'Callable'
in method run at attint.raku line 16
in block <unit> at attint.raku line 19
#!/usr/bin/env raku
use v6;
class Foo {
has &!foo = { put 'this is foo' };
has &!bar;
has &!baz;
method BUILD (:&!foo, :&!bar = { put 'this is bar' }, :&!baz) {
&!baz //= { put 'this is baz' }
}
method run {
&!baz.say;
&!baz();
&!bar.say;
&!bar();
&!foo.say;
&!foo();
}
}
Foo.new.run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment