Sequence

Sequence[expr1,expr2,]

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

Details

Examples

open allclose all

Basic Examples  (1)

Sequence is automatically spliced in:

Scope  (2)

Replace with a sequence that is automatically spliced in:

Applications  (2)

Completely flatten out all lists in the argument to a function:

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

Properties & Relations  (5)

A sequence of arguments matched by __ is treated as a Sequence object:

## represents sequences of arguments by Sequence objects:

A sequence with one argument acts like Identity:

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

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

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

Nothing will only disappear inside lists:

Possible Issues  (2)

Most Wolfram Language functions automatically splice in Sequence objects:

Assignment and replacement functions have the attribute SequenceHold:

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.

CMS

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

BibTeX

@misc{reference.wolfram_2023_sequence, author="Wolfram Research", title="{Sequence}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Sequence.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_sequence, organization={Wolfram Research}, title={Sequence}, year={1996}, url={https://reference.wolfram.com/language/ref/Sequence.html}, note=[Accessed: 19-March-2024 ]}