Hash context
- Perl 6 has a "hash" context to get the hash form of an object.
- Use %( ) or .hash to force hash context:
my $h = <a apple b banana c cherry>.hash; my $h = %(<a apple b banana c cherry>); # same thing
- A List in hash context is smart about creating a Hash:
- Pair objects are converted to hash entries
- Other values are treated in pairs as "key" => value
- String keys are the default for hashes; other objects can be keys.