Skip to content

AssociateTo

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

AssociateTo[s, key -> val] | AssociateTo[s, {rules}]

Adds or updates key-value pairs in the association held by symbol s, modifying s in place.

Examples (1)

Every input below was run against the current Mathilda build and its output recorded.

Basic examples (1)

In[1]:= asc = <|"a" -> 1|>; AssociateTo[asc, "b" -> 2]; asc
Out[1]= <|"a" -> 1, "b" -> 2|>

Implementation notes

Attributes: HoldFirst, Protected.

References

See also: HoldFirst