Created
December 15, 2012 16:31
-
-
Save anonymous/4296890 to your computer and use it in GitHub Desktop.
Example of using Sets in Perl6
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
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 |
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
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