Re: Flat riddle
- To: mathgroup@smc.vnet.net
- Subject: [mg11588] Re: [mg11458] Flat riddle
- From: "Fred Simons" <wsgbfs@win.tue.nl>
- Date: Tue, 17 Mar 1998 10:43:09 -0500
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