Re: nesting pure functions
- To: mathgroup at smc.vnet.net
- Subject: [mg85990] Re: nesting pure functions
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sat, 1 Mar 2008 04:36:42 -0500 (EST)
- Organization: Uni Leipzig
- References: <fq8qk6$j66$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
you must give names to one of the parameter sets, i.e.,
Function[Function[{x,y},x*y][#1,#2]]
or
Function[{x,y},Function[#1*#2][x,y]]
Regards
Jens
Ryan Olf wrote:
> I'm trying to define a function, g, such that given some parameters and
> a function as arguments, it returns a pure function:
>
> g[x_,y_,f_Function] = Function[f[x,y,#]]
>
> However, I need to define g itself as a pure function. I'm not sure how
> to do this. It may be something like this:
>
> g = Function[Function[#3[#1,#2,#?????]]]
>
> Obviously, I want #?????? to be the argument of the of the outermost
> Function, and #1, #2, #3 of the innermost function.
>
> Is there a way of defining g as a pure function (of a pure function) in
> Mathematica?
>
> I appreciate your help,
> Ryan
>