MathGroup Archive 2010

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

Search the Archive

Re: syntax extension

You might want to try Notation package.

In[1]:= <<Notation`
In[2]:= BetterRules[x_->y_]:=x->y^2
In[3]:= Notation[x__/!  y_  \[DoubleLongLeftRightArrow]  
In[4]:= (x+y)/!(x->3)
Out[4]= 9+y


On 1/12/10 3:49 AM, Richard Fateman wrote:
> Is there a neat way to create a new symbol,
> say /!.    so that
> expression /. BetterRules[rules]
> could be written as
> expression /!. rules
> I do not find writing something like
>    (expression) ~BR~ (rules)
> to be quite adequate, especially with the extra parentheses.

  • Prev by Date: Re: Re: Re: More /.{I->-1} craziness
  • Next by Date: Re: restricting interpolating functions to be positive
  • Previous by thread: syntax extension
  • Next by thread: Re: syntax extension, precedence, Notation`