Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2010 16:44
Show Gist options
  • Save anonymous/617097 to your computer and use it in GitHub Desktop.
Save anonymous/617097 to your computer and use it in GitHub Desktop.
pmichaud@plum:~/rakudo$ cat xyz
class XYZ {
has $.v is rw;
}
sub arr($value) {
say $value.list;
XYZ.new(v => $value);
}
my $x = arr((4,5,6));
say $x.v.list;
$x.v = (7,8,9);
say $x.v.list;
pmichaud@plum:~/rakudo$ ./perl6 xyz
456
4 5 6
789
pmichaud@plum:~/rakudo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment