Skip to content

Instantly share code, notes, and snippets.

Created July 2, 2015 05:15
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/0fdb5c3da8c7b0d80934 to your computer and use it in GitHub Desktop.
Save anonymous/0fdb5c3da8c7b0d80934 to your computer and use it in GitHub Desktop.
hash slice oddity
use v6;
my %h = 1 => $%( a => 1, b => 2, c => 3 ), 2 => $%( e => 4, f => 5, g => 6 );
my @i = <1>;
say %h{@i}.map: *.<a>; # 1
say %h<1>.map: *.<a>; # 1 (Any) (Any)
say %h{<1>}.map: *.<a>; # 1 (Any) (Any)
say %h{[1]}.map: *.<a>; # 1 (Any) (Any)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment