Advertisement
happy-barney

p6 - literal hash

Oct 4th, 2019
1,072
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. my $a = %( a => [ ${ b => "c" } ] );
  2.  
  3. say WHAT $a;        # Hash
  4. say WHAT $a<a>;     # Array
  5. say WHAT $a<a>[0];  # Hash
  6.  
  7. my $b = %( a => [ %( b => "c" ) ] );
  8.  
  9. say WHAT $b;        # Hash
  10. say WHAT $b<a>;     # Array
  11. say WHAT $b<a>[0];  # Pair
Advertisement
RAW Paste Data Copied
Advertisement