role Associative

Object that supports looking up values by key

role Associative { }

A common role for types that support name-based lookup through postcircumfix:<{ }>, for example Hash and Map. It is used for type checks in operators that expect to find specific methods to call. See Subscripts for details.

The % sigil restricts variables to objects that do Associative.

Associative does not provide any methods.

Type Graph

Type relations for Associative
perl6-type-graph Associative Associative Mu Mu Any Any Any->Mu Pair Pair Pair->Associative Pair->Any QuantHash QuantHash QuantHash->Associative Cool Cool Cool->Any Iterable Iterable Map Map Map->Associative Map->Cool Map->Iterable PseudoStash PseudoStash PseudoStash->Map Hash Hash Hash->Map Setty Setty Setty->QuantHash Baggy Baggy Baggy->QuantHash Stash Stash Stash->Hash Set Set Set->Any Set->Setty SetHash SetHash SetHash->Any SetHash->Setty Mixy Mixy Mixy->Baggy Bag Bag Bag->Any Bag->Baggy BagHash BagHash BagHash->Any BagHash->Baggy Mix Mix Mix->Any Mix->Mixy MixHash MixHash MixHash->Any MixHash->Mixy

Stand-alone image: vector