Sequence
✖
Sequence
represents a sequence of arguments to be spliced automatically into any function.
Details

- Sequence objects will automatically be flattened out in all functions except those with attribute SequenceHold or HoldAllComplete.
- Assignment and replacement functions have attribute SequenceHold.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Applications (2)Sample problems that can be solved with this function
Completely flatten out all lists in the argument to a function:

https://wolfram.com/xid/0bn5nbm-ipr

Conditionally add an element to a list by using Apply to delay the Sequence until evaluation:

https://wolfram.com/xid/0bn5nbm-e8c2yx

https://wolfram.com/xid/0bn5nbm-5n7rw3


https://wolfram.com/xid/0bn5nbm-db3yxa

Properties & Relations (5)Properties of the function, and connections to other functions
A sequence of arguments matched by __ is treated as a Sequence object:

https://wolfram.com/xid/0bn5nbm-be5

## represents sequences of arguments by Sequence objects:

https://wolfram.com/xid/0bn5nbm-dar

A sequence with one argument acts like Identity:

https://wolfram.com/xid/0bn5nbm-p300mt

Functions that are HoldAllComplete do not automatically splice in Sequence objects:

https://wolfram.com/xid/0bn5nbm-qpil8f

Functions that have attribute HoldAll but not SequenceHold do automatically splice:

https://wolfram.com/xid/0bn5nbm-tucjw8


https://wolfram.com/xid/0bn5nbm-qjm51w

An empty Sequence[] will evaporate inside any head except those with special attributes:

https://wolfram.com/xid/0bn5nbm-rw3umz


https://wolfram.com/xid/0bn5nbm-zthm1n

Nothing will only disappear inside lists:

https://wolfram.com/xid/0bn5nbm-r3iems


https://wolfram.com/xid/0bn5nbm-c63hxf

Possible Issues (2)Common pitfalls and unexpected behavior
Most Wolfram Language functions automatically splice in Sequence objects:

https://wolfram.com/xid/0bn5nbm-b1u


Assignment and replacement functions have the attribute SequenceHold:

https://wolfram.com/xid/0bn5nbm-iur

Wolfram Research (1996), Sequence, Wolfram Language function, https://reference.wolfram.com/language/ref/Sequence.html.
Text
Wolfram Research (1996), Sequence, Wolfram Language function, https://reference.wolfram.com/language/ref/Sequence.html.
Wolfram Research (1996), Sequence, Wolfram Language function, https://reference.wolfram.com/language/ref/Sequence.html.
CMS
Wolfram Language. 1996. "Sequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Sequence.html.
Wolfram Language. 1996. "Sequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Sequence.html.
APA
Wolfram Language. (1996). Sequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sequence.html
Wolfram Language. (1996). Sequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sequence.html
BibTeX
@misc{reference.wolfram_2025_sequence, author="Wolfram Research", title="{Sequence}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Sequence.html}", note=[Accessed: 09-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_sequence, organization={Wolfram Research}, title={Sequence}, year={1996}, url={https://reference.wolfram.com/language/ref/Sequence.html}, note=[Accessed: 09-April-2025
]}