Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a pattern that matches a resource function
ResourceFunction["ResourceFunctionPattern"][rf] creates a pattern that will match instances of the ResourceFunction rf. | |
ResourceFunction["ResourceFunctionPattern"]["name"] creates a pattern that will match ResourceFunction objects with the named "name". |
Test if a ResourceFunction matches a pattern based on the name:
In[1]:= | ![]() |
Out[1]= | ![]() |
See the pattern for a name:
In[2]:= | ![]() |
Out[2]= | ![]() |
Test against a pattern created from the ResourceFunction:
In[3]:= | ![]() |
Out[3]= | ![]() |
Other functions do not match:
In[4]:= | ![]() |
Out[4]= | ![]() |
Filter values using Cases:
In[5]:= | ![]() |
Out[5]= | ![]() |
Filter in values using Select with a MatchQ operator:
In[6]:= | ![]() |
Out[6]= | ![]() |
Create an operator:
In[7]:= | ![]() |
Out[7]= | ![]() |
Match it against a pattern based on the ResourceFunction:
In[8]:= | ![]() |
Out[8]= | ![]() |
Create a function that takes a specific ResourceFunction as an argument:
In[9]:= | ![]() |
In[10]:= | ![]() |
In[11]:= | ![]() |
Use the function:
In[12]:= | ![]() |
Out[12]= | ![]() |
Create an expression containing resource functions used a objects:
In[13]:= | ![]() |
Out[13]= | ![]() |
Replace the objects:
In[14]:= | ![]() |
Out[14]= | ![]() |
Define two resource functions with the same name:
In[15]:= | ![]() |
Out[15]= | ![]() |
In[16]:= | ![]() |
Out[16]= | ![]() |
They both match a pattern defined with the name:
In[17]:= | ![]() |
Out[17]= | ![]() |
In[18]:= | ![]() |
Out[18]= | ![]() |
They do not match a pattern based on the other ResourceFunction:
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
Create an operator:
In[21]:= | ![]() |
Out[21]= | ![]() |
The match fails based only on a name:
In[22]:= | ![]() |
Out[22]= | ![]() |
Match it against a pattern based on the ResourceFunction:
In[23]:= | ![]() |
Out[23]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License