MathGroup Archive 2003

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

Search the Archive

Prefix[f[x]], why is it not working

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38909] Prefix[f[x]], why is it not working
  • From: "Ashraf El Ansary" <Elansary at btopenworld.com>
  • Date: Sat, 18 Jan 2003 00:38:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi all,
Does anyone why f@a_=2 a gives a proper answer for f[1]
and not in the case of Prefix[s[a_]]= 2 a eventhough that Prefix[s[a_]]=
f@a_???

Thanks
In[1]:=
f@a_=2 a
f[1]
Out[1]=
2 a
Out[2]=
2
In[3]:=
Prefix[s[a_]]
Prefix[s[a_]]=2 a
s[1]
Out[3]=
s@a_
Set::write: Tag Prefix in s@a_ is Protected.
Out[4]=
2 a
Out[5]=
s[1]




  • Prev by Date: Re: non-linear equations not covered by built-in procedures
  • Next by Date: OO System for Mathematica
  • Previous by thread: Re: Modifying arguments of sub-parts of an expression (improved)
  • Next by thread: RE: Prefix[f[x]], why is it not working