Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2007

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

Search the Archive

Re: Functions with data hidden in them

  • To: mathgroup at
  • Subject: [mg82053] Re: Functions with data hidden in them
  • From: Neil Stewart <neil.stewart at>
  • Date: Wed, 10 Oct 2007 04:33:14 -0400 (EDT)
  • Reply-to: Neil Stewart <neil.stewart at>

Thank you to everyone who replied. Szabolcs Horv=E1t sent a simple solution

The data "5" in "power[5]" is hidden inside the "f[]" function:

In[1]:= power[n_][x_] := x^n

In[2]:= Format[power[_]] := "--power--"

In[3]:= f = power[5]
Out[3]= "--power--"

In[4]:= f[2]
Out[4]= 32

DrMajorBob posted a similar solution.

Hannes Kessler posted a method that avoids recalculation of intermediate

Mark Holt posted a trick with the Button[] function.

  • Prev by Date: Row vs. GraphicsRow
  • Next by Date: Re: Reproducible crash on startup when opening empty text file
  • Previous by thread: Re: Functions with data hidden in them
  • Next by thread: Interpolation does not quite interpolate