Re: associate a parameter name with a string
- To: mathgroup at smc.vnet.net
- Subject: [mg75447] Re: associate a parameter name with a string
- From: Januk <ggroup at sarj.ca>
- Date: Tue, 1 May 2007 03:22:33 -0400 (EDT)
- References: <email@example.com>
Hi Bill, On Apr 29, 3:11 am, Bill Rowe <readnews... at sbcglobal.net> wrote: <snip> > I don't recall why it is necessary to use Set[#1,f[#2]]& instead > of #1=f[#2]& in this application <snip> I think it is a matter of order of operations. With the #1=f[#2]& notation, where does the pure function start? A typical use of the shorthand may be: myfunc = #1<#2& Clearly in this case you want myfunc to be set to this pure function. The same applies to #1=f[#2]&, you are trying to set the "symbol" #1 to f[#2]&. This is not allowed. To clear up the ambiguity, use brackets: (#1 = f[#2])& Hope that helps.