expreduce
expreduce copied to clipboard
Need to handle Flat definitions correctly
In[14]:= SetAttributes[foo, {Flat, Listable, NumericFunction, OneIdentity, Orderless}]
In[20]:= foo[x, y] := c
In[21]:= foo[x, y, z]
Out[21]= foo[c, z]
In[25]:= ClearAttributes[foo, {Flat, Listable, NumericFunction, OneIdentity, Orderless}]
In[28]:= ClearAll[foo]
In[31]:= foo[x, y] := c
In[32]:= foo[x, y, z]
Out[32]= foo[x, y, z]