OneIdentity
Usage
• OneIdentity 是一个属性,赋予一个符号 f 来指定 f[x], f[f[x]]等,为了模式匹配它们都等价于 x 。
Notes
• 象Plus和Times的函数有属性 OneIdentity. • Times有属性OneIdentity允许象 n_. x_的一个模式匹配 x.
Further Examples
These three functions have the attribute OneIdentity.
In[1]:=
|
Out[1]=
|
These three don't.
In[2]:=
|
Out[2]=
|
|