Re: F[f_,x_]:=f[x] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg19835] Re: F[f_,x_]:=f[x] ?
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sun, 19 Sep 1999 01:20:22 -0400
- Organization: University of Western Australia
- References: <7rsi9t$3im@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Patrick McLean wrote: > What is the name of the in-built Mathematica function that plays the role > of F in te following: > > F[f_,x_]:=f[x]. > > For example, > > Outer[F,{f,g},{x,y}] > > will give: > > {{f[x],f[y]},{g[x],g[y]}}. Although f at x is the prefix form of f[x] you cannot use it here. Two ideas: [1] Use a pure function instead of F: Outer[#1[#2] & , {f, g}, {x, y}] [2] Use Thread and Through: Thread /@ Through[{f, g}[{x, y}]] Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________