[Date Index]
[Thread Index]
[Author Index]
Re: notation using # with exponents and &
*To*: mathgroup at smc.vnet.net
*Subject*: [mg93145] Re: notation using # with exponents and &
*From*: Bill Rowe <readnews at sbcglobal.net>
*Date*: Tue, 28 Oct 2008 04:55:49 -0500 (EST)
On 10/27/08 at 3:12 AM, siegman at stanford.edu (AES) wrote:
>In article <gdhqdk$2ir$1 at smc.vnet.net>,
>Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com> wrote:
>>A pure function (or anonymous function in some other programming
>>languages)
>"Anonymous function" might in fact seem to be a more meaningful name
>for the Mathematic construct, especially since what Mathematica
>refers to as a "pure function" seems to be significantly different
>from what Wikipedia refers to as a "pure function" in mathematics.
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. However, defining f by
f = Sin
would also meet Wikipedia's definition of a pure function. Since
this later doesn't seem to be what is called a pure function in
the documentation for Mathematica, it would seem the Mathematica
definition is somewhat more restrictive than Wikipedia's definition.
Calling f = #^2& an anonymous function doesn't seem quite
correct since it now has a name, which is f. On the other hand
when written as
#^2&/@list
Now the #^2& part has no name and seems to meet the usual
definition for anonymous function.
In any case, whether what the Mathematica documentation calls a
pure function is consistent with some other definition is of
little practical significance. It certainly isn't helpful to
call the construct an anonymous function even if this is more
correct in some sense given doing so is not consistent with the
Mathematica documentation. Using a nomenclature inconsistent
with the documentation is certain to cause more confusion rather
than increase clarity.
Prev by Date:
**Re: Export ListPlots using PlotMarkers to .pdf**
Next by Date:
**Re: Nonlinear Regression Oddities and Questions**
Previous by thread:
**Re: notation using # with exponents and &**
Next by thread:
**Re: notation using # with exponents and &**
| |