Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get a list of symbols that an expression depends on
ResourceFunction["SymbolDependencies"][sym] finds symbols that appear in the definition of sym. | |
ResourceFunction["SymbolDependencies"][sym,h] wraps the head h around each symbol before returning. | |
ResourceFunction["SymbolDependencies"][sym,h,n] recursively finds symbols using up to n steps. |
Get the dependencies of a symbol:
In[1]:= | ![]() |
Out[4]= | ![]() |
Apply a wrapper to each symbol:
In[5]:= | ![]() |
Out[6]= | ![]() |
Specify a level:
In[7]:= | ![]() |
Out[7]= | ![]() |
Get full dependencies:
In[8]:= | ![]() |
Out[9]= | ![]() |
Any expression can be used in the first argument:
In[10]:= | ![]() |
Out[10]= | ![]() |
Ignore undefined symbols:
In[11]:= | ![]() |
Out[11]= | ![]() |
By default, local symbols left over from Module evaluations are ignored:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
Include Module symbols:
In[14]:= | ![]() |
Out[14]= | ![]() |
By default, the given symbol will not be included in the output:
In[15]:= | ![]() |
Out[18]= | ![]() |
Include the symbol:
In[19]:= | ![]() |
Out[19]= | ![]() |
Exclude symbols from specific contexts:
In[20]:= | ![]() |
Out[20]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License