Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.04 KB

File metadata and controls

56 lines (34 loc) · 1.04 KB

Association

Association[key1 -> val1, key2 -> val2, ...>

or

<|key1 -> val1, key2 -> val2, ...|>

represents an association between keys and values.

Examples

>> Association({akey->avalue, bkey->bvalue, ckey->cvalue}) 
<|akey->avalue,bkey->bvalue,ckey->cvalue|> 

Association is the head of associations:

>> Head(<|a -> x, b -> y, c -> z|>)
Association

>> <|a -> x, b -> y|>
<|a -> x, b -> y|>
     
>> Association({a -> x, b -> y})
<|a -> x, b -> y|>

Associations can be nested:

>> <|a -> x, b -> y, <|a -> z, d -> t|>|>
<|a -> z, b -> y, d -> t|>

Related terms

AssociationQ, Counts, Keys, KeySort, Lookup, Values

Implementation status

  • ✅ - full supported

Github