Created
October 8, 2010 16:29
-
-
Save anonymous/617072 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
pmichaud@plum:~/rakudo$ cat xyz | |
sub arr($key, Mu $value) { | |
Pair.new( key => $key, value => $value ); | |
} | |
my $x = arr('a', (4,5,6)); | |
say $x.value.list; | |
my $y = Pair.new( key => 'a', value => (4,5,6).item ); | |
say $y.value.list; | |
pmichaud@plum:~/rakudo$ ./perl6 xyz | |
4 5 6 | |
456 | |
pmichaud@plum:~/rakudo$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment