Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b],
- To: mathgroup at smc.vnet.net
- Subject: [mg109725] Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b],
- From: David Bevan <david.bevan at pb.com>
- Date: Fri, 14 May 2010 05:33:16 -0400 (EDT)
In[]:== innerApply[f_,a_]:==Apply@@#&/@Transpose[{f,a}] innerApply[{f,g},{{a,b},{c,d}}] Out[]== {f[a,b],g[c,d]} David %^> > -----Original Message----- > From: Fred Klingener [mailto:gigabitbucket at BrockEng.com] > Sent: 13 May 2010 12:26 > To: mathgroup at smc.vnet.net > Subject: [mg109721] innerApply[{f, g}, {{a, b}, {c, d}}] == {f[a, b], g[c, > d]} ? > > This seems to work fine, but there must be a less clumsy way to do it: > > Clear[innerApply, functionList, argumentList, f, g, a, b, c, d] > > innerApply[functionList_, argumentList_] :== > Table[functionList[[j]] @@ argumentList[[j]], {j, 1, > Length[functionList]}] > > In[770]:== innerApply[{f, g}, {{a, b}, {c, d}}] > Out[770]== {f[a, b], g[c, d]} > > TIA, > Fred Klingener >