Catenate

Catenate[{list1,list2,}]
yields a single list with all elements from the in order.

Catenate[{assoc1,assoc2,}]
yields a list of all values in order appearing in the associations .

DetailsDetails

  • Catenate[{expr1,expr2,}] allows the to be any mixture of lists and associations.
  • Any of the with head Missing are ignored.
  • For an association assoc, Catenate[assoc] is taken to be Catenate[Values[assoc]].

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Catenate several lists:

In[1]:=
Click for copyable input
Out[1]=

Catenate associations:

In[1]:=
Click for copyable input
Out[1]=

Catenate effectively flattens the first two levels of a high-dimensional array:

In[1]:=
Click for copyable input
Out[1]=

Catenate strips the keys, joining all the values:

In[1]:=
Click for copyable input
Out[1]=

Catenate does not override the values for the same keys:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)