Re: Function as an argument
- To: mathgroup at smc.vnet.net
- Subject: [mg76702] Re: [mg76625] Function as an argument
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Sat, 26 May 2007 04:27:11 -0400 (EDT)
- References: <200705251020.GAA06125@smc.vnet.net>
On May 25, 2007, at 6:20 AM, dXdYdZdu wrote: > Hi, I have problem. I want to do something like this: > > ss[x_] = 2 + x^3 ; > MyFunction[expression_] := Module[{}, Return[expression[2]]] > Calling MyFunction[ss] will produce 10 and this is working case. > > but this is what I can not do: > > MyFunction[2 + x^3] > > Is there a way to make this to work as well? MyFunction[2+#^3&]
- References:
- Function as an argument
- From: "dXdYdZdu" <dxdydzdu@gmail.com>
- Function as an argument