Sequences

The function Flatten allows you to explicitly flatten out all sublists.
In[1]:=
Click for copyable input
Out[1]=
FlattenAt lets you specify at what positions you want sublists flattened.
In[2]:=
Click for copyable input
Out[2]=
Sequence objects automatically get spliced in, and do not require any explicit flattening.
In[3]:=
Click for copyable input
Out[3]=
Sequence[e1,e2,...]a sequence of arguments that will automatically be spliced into any function

Representing sequences of arguments in functions.

Sequence works in any function.
In[4]:=
Click for copyable input
Out[4]=
This includes functions with special input forms.
In[5]:=
Click for copyable input
Out[5]=
Here is a common way that Sequence is used.
In[6]:=
Click for copyable input
Out[6]=
New to Mathematica? Find your learning path »
Have a question? Ask support »