MathGroup Archive 2010

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109721] innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b], g[c, d]} ?
  • From: Fred Klingener <gigabitbucket at BrockEng.com>
  • Date: Thu, 13 May 2010 07:25:54 -0400 (EDT)

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: Trying to remove item from list of filenames
  • Next by Date: Re: Trying to remove item from list of filenames
  • Previous by thread: Re: Part specification... is neither an integer nor a
  • Next by thread: Re: innerApply[{f, g}, {{a, b}, {c, d}}] = {f[a, b], g[c, d]} ?