MathGroup Archive 2004

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

Search the Archive

Re: Forcing Argument Evaluation

  • To: mathgroup at
  • Subject: [mg49873] Re: [mg49848] Forcing Argument Evaluation
  • From: DrBob <drbob at>
  • Date: Thu, 5 Aug 2004 09:20:33 -0400 (EDT)
  • References: <>
  • Reply-to: drbob at
  • Sender: owner-wri-mathgroup at

f is a function, in the sense that when Mathematica sees it with an argument--f[2], for instance--your definition matches that pattern, so Mathematica can substitute 2 for x in the right-hand side and get 4.

But f/2[2] doesn't match the pattern, so your definition doesn't take effect.

If you want the elements of "a" to be functions, you can do this:

f[x_] := x^2
a = {f, f[#1]/2 & , Function[y, f[y]/2]};


Here's a more complicated example:

a = NestList[Function[y, Evaluate[#1[y]^3/2]] & , f, 3]
{f, Function[y, y^6/2],
   Function[y, y^18/16],
   Function[y, y^54/8192]}



On Wed, 4 Aug 2004 10:46:25 -0400 (EDT), Scott Guthery <sguthery at> wrote:

> f[x_] := x^2;
> a = {f,f/2};
> 4
> f/2[2]
>I know I'm missing something fundamental.
>Cheers, Scott

DrBob at

  • Prev by Date: Re: Asymmetric quadratic coefficient problem
  • Next by Date: Binomial ratio expectation
  • Previous by thread: Re: Forcing Argument Evaluation
  • Next by thread: Re: Forcing Argument Evaluation