MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Unwanted Recursion

  • To: mathgroup at
  • Subject: [mg120099] Re: Unwanted Recursion
  • From: David Bailey <dave at>
  • Date: Fri, 8 Jul 2011 04:53:33 -0400 (EDT)
  • References: <iv1a95$sjl$> <iv45tf$f6i$>

On 07/07/2011 12:39, David Bailey wrote:
> In[649]:= p[a_]:=a;
> In[650]:= p[a]
> Out[650]= a
Sorry, I didn't notice that you had used the Flat attribute. I suggest 
you use:

In[1]:= SetAttributes[p, {Flat, OneIdentity}]

In[4]:= p[a_] := a

In[5]:= p[b]

Out[5]= b

This works without any errors.

David Bailey

  • Prev by Date: Re: Bug 1+4/10
  • Next by Date: Re: Stacked fractions
  • Previous by thread: Re: Unwanted Recursion
  • Next by thread: Re: Unwanted Recursion