Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

pure function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113689] pure function
  • From: Stephan <stschiff80 at googlemail.com>
  • Date: Mon, 8 Nov 2010 03:37:09 -0500 (EST)

Hi,

I have a function that returns a pure function:

In[1]:= getFunc := Module[{a=2}, Function[{x}, a * x]]

In[2]:= f = getFunc

Out[2]= Function[{x$}, a$57 x$]


Is there any way, to have the body of the returned function contain the actual _value_ of the local variable a, instead of the _symbol_ ?

So I would like the returned function to be written as

	Function[{x$}, 2 x$]

The reason is, that I would like to have a quick way to actually see the value instead of digging out the local variable a$57...

Thanks,

Stephan


  • Prev by Date: DownValues
  • Next by Date: x and y labels in ArrayPlot
  • Previous by thread: Re: DownValues
  • Next by thread: Re: pure function