|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
OneIdentity
OneIdentity
is an attribute that can be assigned to a symbol f to indicate that
,
, etc. are all equivalent to x for the purpose of pattern matching.
DetailsDetails
- Functions like Plus and Times have the attribute OneIdentity.
- The fact that Times has attribute OneIdentity allows a pattern like
to match
.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
The pattern matches, because Times has attribute OneIdentity:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
Any function with attribute OneIdentity will match:
| In[3]:= |
| In[4]:= |
| Out[4]= |
New in 1 | Last modified in 5
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
