MathGroup Archive 1998

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

Search the Archive

Re: Flat riddle



Dear Ted,

Maybe the following does what you are looking for.

As far as I can see, when a function f with Attribute Flat is 
evaluated, the variable a is replaced with f[a] instead of with a:

SetAttributes[f, Flat]

f[a_] := (Print[ Hold[a] ]; Hold[a])

f[x] now prints and returns  Hold[f[x]].

Define

f[a_] := Hold[a][[1,1]]

and f is the identity function with attribute Flat.


Fred Simons
Eindhoven University of Technology



  • Prev by Date: Piecewise Continuous Functions.
  • Next by Date: Re: Eigenvalues
  • Prev by thread: Re: Flat riddle
  • Next by thread: Re: Flat riddle