Re: Defining a flat, orderless, one-identical function?
- To: mathgroup at smc.vnet.net
- Subject: [mg28096] Re: [mg28046] Defining a flat, orderless, one-identical function?
- From: Ralph Benzinger <mma-l at endlos.net>
- Date: Fri, 30 Mar 2001 04:12:52 -0500 (EST)
- References: <200103290824.DAA03033@smc.vnet.net> <B6E8D3A8.BC10%andrzej@platon.c.u-tokyo.ac.jp>
- Sender: owner-wri-mathgroup at wolfram.com
On March 29, you wrote: > This is a rather complex issue tha thas been already discussed in some > detail a number of times so you shoudl search the archives to understand > more. Thanks for pointing this out; I admit I did a shoddy job in searching the archives. I've now found a series of article from January 2000 that pretty much settle the issue once and for all. There also was an inquiry from 1995 and an interesting solution from Wolfram's support staff that suggested removing the Flat attribute and adding definitions that would unfold nested function calls manually. > Here is just one solution to your problem, the main idea of which, if > I remeber correctly, was once suggested by Carl Woll: [...] > > In[2]:= > (x_max/;Length[Unevaluated[x]]==1):=Hold[x][[1,1]] Great! This ingenious rule works like a charm. It's quite a hack, though, isn't it? ;-) Ralph -- Ralph Benzinger "This is my theory, it is mine, I own it, Cornell Univeristy and what it is, too." -- Ann Elk (Mrs.)
- References:
- Defining a flat, orderless, one-identical function?
- From: Ralph Benzinger <mma-l@endlos.net>
- Defining a flat, orderless, one-identical function?