Catenate

Catenate[{list1,list2,}]

yields a single list with all elements from the listi in order.

Catenate[{assoc1,assoc2,}]

yields a list of all values in order appearing in the associations associ.

Details

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

Examples

Basic Examples  (5)

Catenate several lists:

Catenate associations:

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

Catenate strips the keys, joining all the values:

Catenate does not override the values for the same keys:

Wolfram Research (2014), Catenate, Wolfram Language function, https://reference.wolfram.com/language/ref/Catenate.html.

Text

Wolfram Research (2014), Catenate, Wolfram Language function, https://reference.wolfram.com/language/ref/Catenate.html.

CMS

Wolfram Language. 2014. "Catenate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Catenate.html.

APA

Wolfram Language. (2014). Catenate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Catenate.html

BibTeX

@misc{reference.wolfram_2024_catenate, author="Wolfram Research", title="{Catenate}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Catenate.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_catenate, organization={Wolfram Research}, title={Catenate}, year={2014}, url={https://reference.wolfram.com/language/ref/Catenate.html}, note=[Accessed: 22-November-2024 ]}