Skip to content

AssociationThread

Status: Stable

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

Description

AssociationThread[{k...}, {v...}]  |  AssociationThread[keys -> values]
    Builds <|k1 -> v1, ...|> from parallel key and value lists.

Examples

All examples below are verified against the current Mathilda build.

In[1]:= AssociationThread[{"a", "b"}, {1, 2}]
Out[1]= <|"a" -> 1, "b" -> 2|>

In[2]:= AssociationThread[{"a", "b"} -> {1, 2}]
Out[2]= <|"a" -> 1, "b" -> 2|>

Implementation notes

Attributes: Protected.

Implementation status

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

References