Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 16:31
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 anonymous/4296890 to your computer and use it in GitHub Desktop.
Save anonymous/4296890 to your computer and use it in GitHub Desktop.
Example of using Sets in Perl6
Cannot look up attributes in a type object
in method pairs at src/gen/CORE.setting:11915
in sub register-arg at src/gen/CORE.setting:11670
in method new at src/gen/CORE.setting:11677
in sub set at src/gen/CORE.setting:11708
in sub infix:<(|)> at src/gen/CORE.setting:11856
in sub infix:<(|)> at src/gen/CORE.setting:11854
in block at ./set.p6:7
class A {
has KeyBag $.people is rw;
}
my $a = A.new();
for 'A', 'B', 'C' -> $name {
$a.people = $a.people (|) $name;
}
$a.perl.say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment