Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Append multiple items to an expression at once
ResourceFunction["AppendSequence"][expr,elem1,elem2,…] gives expr with the elements elem1,elem2,… appended. | |
ResourceFunction["AppendSequence"][elem] represents an operator form of ResourceFunction["AppendSequence"] that can be applied to an expression. |
In[1]:= | ![]() |
Out[1]= | ![]() |
Append to an Association:
In[2]:= | ![]() |
Out[2]= | ![]() |
Append to a SparseArray:
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
View the corresponding list:
In[5]:= | ![]() |
Out[5]= | ![]() |
Use the operator form:
In[6]:= | ![]() |
Out[6]= | ![]() |
In[7]:= | ![]() |
Out[7]= | ![]() |
Use a head other than List:
In[8]:= | ![]() |
Out[8]= | ![]() |
Append elements without evaluating them:
In[9]:= | ![]() |
Out[9]= | ![]() |
Append multiple options to a Notebook:
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
Successively append to a list:
In[12]:= | ![]() |
Out[12]= | ![]() |
Using AppendSequence with heads that have the attribute SequenceHold will append a Sequence:
In[13]:= | ![]() |
Out[13]= | ![]() |
The operator form only takes a single argument:
In[14]:= | ![]() |
Out[14]= | ![]() |
Wrap multiple arguments with Sequence to use in the operator form:
In[15]:= | ![]() |
Out[15]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License