Re: Function as an argument of the function

*To*: mathgroup at smc.vnet.net*Subject*: [mg34732] Re: Function as an argument of the function*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Tue, 4 Jun 2002 03:41:42 -0400 (EDT)*Organization*: Universitaet Leipzig*References*: <ada17i$kc8$1@smc.vnet.net>*Reply-to*: kuska at informatik.uni-leipzig.de*Sender*: owner-wri-mathgroup at wolfram.com

Hi, it fails not ! it returns False as it should, because func[y]=1 is *not* a function definition. It defines a constant, but not a constant function. A function should map a parameter space like all real number onto an image space and the symbol y is not a parameter space. Regards Jens DrBob wrote: > > That solution fails in this case: > > ClearAll[func] > func[y] = 1; > Length[Cases[func, Slot[_], Infinity]] == 1 || (func =!= Head[func[x]]) > > Bobby > > -----Original Message----- > From: Jens-Peer Kuska [mailto:kuska at informatik.uni-leipzig.de] To: mathgroup at smc.vnet.net > Subject: [mg34732] Re: Function as an argument of the function > > Sorry for my last > answer, you have to test: > > Length[Cases[func, Slot[_], Infinity]] == 1 || (func =!= Head[func[x]]) > > to "find" a function of one variable. > > Regards > Jens > > Tomek wrote: > > > > Hi. > > I have to write a short function in Mathematica. But I have one > > problem with it. One of arguments of my function have to be a > > function of one variable. > > How can I check if the argument of the function is a function of one > > variable (I wish there's FunctionQ)?