Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Re: Prefix function syntax f @ x

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66678] Re: [mg66651] Re: [mg66638] Prefix function syntax f @ x
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 27 May 2006 03:50:51 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200605250658.CAA03726@smc.vnet.net> <200605260817.EAA01716@smc.vnet.net>
  • Reply-to: murray at math.umass.edu
  • Sender: owner-wri-mathgroup at wolfram.com

Of course @, as in f @ g, is remarkably similar to the traditional 
mathematical symbol (a small circle) for function composition.  So using 
f@g[x] in place of f[g[x]]] ought not to be that "non-standard".

Actually, it's non-standard from the viewpoint of mathematical notation 
in one respect:  Let me use o to stand for the traditional mathematical 
small circle (in TeX: \circ).  Then

    (f o g)(x)

by definition means f(g(x))).

In Mathematica, by contrast,

    (f@g)[x]

does NOT mean the same thing as f[g[x]].  For example:

   f[x_] := x^2
   g[x_] := x + 5
   (f@g)[x] // FullForm
Power[g, 2][x]

Andrzej Kozlowski wrote:
> On 25 May 2006, at 15:58, Kristen W Carlson wrote:
> 
>> Hi,
>>
>> David Wagner emphasizes that he doesn't use the syntax
>> function@argument (p. 37n), no explanation. To me it seems very handy.
>> Any thoughts?
> 
> 
> I also never use it (although until I now have never considered why).  
> I guess the reason must be is that f[x] or f(x) is the standard  
> mathematical notation for the value of a function f at x and I am  
> used to it. I don't have this problem with @@, /@ or even @@@  
> probably because these are programming constructs that do not  
> correspond to any standard mathematical concepts.
> 
> Andrzej Kozlowski
> Tokyo, Japan
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Re: M100: An Introduction To Mathematica
  • Next by Date: Re: Interval[{a,b}]-Interval[{a,b}] = 0?
  • Previous by thread: Re: Prefix function syntax f @ x
  • Next by thread: Re: Re: Prefix function syntax f @ x