MathGroup Archive 2004

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

Search the Archive

Defining a function in module problem?


why does this

a[x_] := Module[{f, g}, g = z/3; f = Function[z, Evaluate[g]]; f[x]]

produce

a[1] = z/3

instead of

a[1]=1/3

I don't understand the philosophy here.

thanks in advance.


  • Prev by Date: RE: Question: formatting text, sections
  • Next by Date: Re: Difference of numbers in the list
  • Previous by thread: Re: one liner for a function?
  • Next by thread: How to make the Mathematica Kernel return DisplayPackets?