Re: = {f[a, b], g[c, d]} ?
- To: mathgroup at smc.vnet.net
- Subject: [mg109730] Re: = {f[a, b], g[c, d]} ?
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 14 May 2010 05:34:12 -0400 (EDT)
On 5/13/10 at 7:25 AM, gigabitbucket at BrockEng.com (Fred Klingener)
wrote:
>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]}
This seems less clumsy to me:
In[1]:= MapThread[#1 @@ #2 &, {{f, g}, {{a, b}, {c, d}}}]
Out[1]= {f[a, b], g[c, d]}
Perhaps someone else will suggest something even more elegant