MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b],

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109738] Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b],
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 14 May 2010 05:35:43 -0400 (EDT)

MapThread[#1 @@ #2 &, {{f, g}, {{a, b}, {c, d}}}]

{f(a,b),g(c,d)}


Bob Hanlon

---- Fred Klingener <gigabitbucket at BrockEng.com> 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]}

TIA,
Fred Klingener



  • Prev by Date: Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b], g[c, d]} ?
  • Next by Date: Help: my mathemetica is broken
  • Previous by thread: Re: Converting colors to height values
  • Next by thread: Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b],