Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Use as an operator form of Set
ResourceFunction["SetTo"][expr][value] is equivalent to expr = value. | |
ResourceFunction["SetTo"][{e1,e2,…}][{v2,v2,…}] sets the value of each ei to vi. |
Use an operator form of Set:
In[1]:= |
![]() |
Out[1]= |
![]() |
The value of x has changed:
In[2]:= |
![]() |
Out[2]= |
![]() |
Set a value with postfix notation:
In[3]:= |
![]() |
Out[3]= |
![]() |
In[4]:= |
![]() |
Out[4]= |
![]() |
Set multiple values:
In[5]:= |
![]() |
Out[5]= |
![]() |
In[6]:= |
![]() |
Out[6]= |
![]() |
The expr doesn’t need to be a symbol:
In[7]:= |
![]() |
Out[7]= |
![]() |
In[8]:= |
![]() |
Out[8]= |
![]() |
Use Unevaluated to delay evaluation:
In[9]:= |
![]() |
In[10]:= |
![]() |
In[11]:= |
![]() |
Out[11]= |
![]() |
Use as a callback function:
In[12]:= |
![]() |
Out[12]= |
![]() |
Check the value:
In[13]:= |
![]() |
Out[13]= |
![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License