MathGroup Archive 2009

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

Search the Archive

Re: Style for function calls?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97280] Re: Style for function calls?
  • From: dh <dh at metrohm.com>
  • Date: Tue, 10 Mar 2009 05:32:43 -0500 (EST)
  • References: <goqpg6$lsb$1@smc.vnet.net>


Hi Erik,

as you mention, // is more like an afterthought, but @ seems rather like 

a "main" thought. It is mainly used in functional programming style 

where you feed the output of one function into the next function.

If you use it, beware of precedence.

Concening ~, I never used it so far.

Daniel



Erik Max Francis wrote:

> I'm fairly new to Mathematica and have a style question rather than a 

> functionality question.

> 

> I'm aware with the operator forms for Postfix (//), Prefix (@), and 

> Infix (~), and I've found the // operator useful for piping long results 

> through the ...Form functions, or N, or the like, as a quick 

> afterthought while typing a lot of stuff.

> 

> What are the analogous situations where @ or ~ are used?  Looking at 

> random notebooks around I've from time to time seen them used but there 

> doesn't seem to be any rhyme or reason; it's not clear when 

> stylistically they'd be useful, as opposed to the // operator, which I 

> can see and use myself.

> 




  • Prev by Date: Re: Help
  • Next by Date: Re: Re: Notebook that auto-executes when opened?
  • Previous by thread: Re: Style for function calls?
  • Next by thread: Re: Style for function calls?