Skip to content

Instantly share code, notes, and snippets.

@dagurval
Created December 8, 2013 09:59
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 dagurval/9c238e886a57025153cc to your computer and use it in GitHub Desktop.
Save dagurval/9c238e886a57025153cc to your computer and use it in GitHub Desktop.
$ cat p6test.p6
sub a {
gather {
my %a = { hello => "world" }
my %b = { hello => "world", santa => "clause" }
take %a;
take %b;
}
}
sub b {
gather {
take { hello => "world" }
take { hello => "world", santa => "clause" }
}
}
say "A: ", a().perl;
say "B: ", b().perl;
$ perl6 p6test.p6
A: ("hello" => "world", "hello" => "world", "santa" => "clause").list
B: ({"hello" => "world"}, {"hello" => "world", "santa" => "clause"}).list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment