MathGroup Archive 2008

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

Search the Archive

Re: notation using # with exponents and &


In article <ge6nik$ll4$1 at smc.vnet.net>,
 Bill Rowe <readnews at sbcglobal.net> wrote:

> 
> I don't see that what Mathematica defines as a pure function is
> inconsistent with the Wikipedia definition. For example,
> 
> f = #^2&
> 
> Always returns the same value for the same argument and has no
> I/O side effect, meeting both requirements for Wikipedia's
> definition of a pure function.

I guess I get confused, or led astray, by exactly how the words in the 
Wiki definition are to be interpreted.  For example

   f = #^x &

seems to me to be a function with an argument (the "#"), and a -- what 
shall we call it? -- a "parameter" (the "x"); and this construct returns 
_different_ values depending on how the value of x is pre-set, or 
changed, before calling it.  

In other words, it does _not_ always return the same value for the same 
argument.

I can see  #1^#2 & as evidently a pure function.  But if the function 
definition also contains parameters that can be varied, is it still a 
pure function?  And if so, what does "pure" really mean?


  • Prev by Date: Re: Is there a way to make Mathematica commands and functions
  • Next by Date: Re: Is there a way to make Mathematica commands and functions
  • Previous by thread: Re: notation using # with exponents and &
  • Next by thread: Re: notation using # with exponents and &