MathGroup Archive 2010

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

Search the Archive

Re: := vs = in some function definitions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113406] Re: := vs = in some function definitions
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 27 Oct 2010 05:16:48 -0400 (EDT)

On 10/26/10 at 5:32 AM, sam.takoy at yahoo.com (Sam Takoy) wrote:

>Here's one more thing I can't figure out:

>testFunction[f_][x_, y_] = Module[{},
>Print[f[x, y]];
>5
>];
>testFunction[ArcTan][x, y]

>Why doesn't this function print out ArcTan[x, y]?

After you define testFunction as you did above do

?testFunction

and see if that doesn't answer your question. Keep in mind when
you use Set (=) the right hand side is first evaluated then the
result of the evaluation is assigned to the left hand side.



  • Prev by Date: Manually nested Tables faster than builtin nesting?
  • Next by Date: Importing data
  • Previous by thread: Re: := vs = in some function definitions
  • Next by thread: Re: := vs = in some function definitions