MathGroup Archive 2001

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

Search the Archive

Re: Applying List of Functions To List Of Arguments


At 2:19 -0400 1-08-2001, Ronnen Levinson wrote:
>Hi.
>
>What function or operator will let me apply a list of functions to a
>list of arguments? That is, I'd like to apply {f1,f2,f3} to {a,b,c} to
>get {f1[a],f2[b],f3[c]}.
>
>Yours truly,
>
>Ronnen.




In[3]:=
#[[1]]@#[[2]]&/@Transpose[{{f1,f2,f3},{a,b,c}}]

Out[3]=
{f1[a],f2[b],f3[c]}

A shorter and faster solution is

In[4]:=
MapThread[#1@#2&,{{f1,f2,f3},{a,b,c}}]

Out[4]=
{f1[a],f2[b],f3[c]}


Adriano Pascoletti



  • Prev by Date: Re: Applying List of Functions To List Of Arguments
  • Next by Date: Combining several InterploatingFunction to one
  • Previous by thread: Re: Applying List of Functions To List Of Arguments
  • Next by thread: Re: Applying List of Functions To List Of Arguments