MathGroup Archive 2005

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

Search the Archive

Re: Applying a list of functions to a list of arguments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57326] Re: Applying a list of functions to a list of arguments
  • From: Marcus Stollsteimer <marcus314 at yahoo.com>
  • Date: Wed, 25 May 2005 06:02:30 -0400 (EDT)
  • References: <d6usl9$j41$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

D M Yates wrote:

> I have a list of functions, and a list of arguments:
> 
> For example,
> f = {f1, f2, f3}
> a = {a1,a2,a3}
> 
> I would like to return
> {f1[a1],f2[a2],f3[a3]}


Hi Derek,

I am sure there is a better solution, but the following seems to work:

Inner[#1[#2]&, f, a, List]

{f1[a1], f2[a2], f3[a3]}

Regards,
Marcus

-- 
He spends most of his time writing, and is currently revising his
autobiography to include himself. -- W. Allen


  • Prev by Date: Re: Log function
  • Next by Date: Re: Log function
  • Previous by thread: Re: Applying a list of functions to a list of arguments
  • Next by thread: Re: Applying a list of functions to a list of arguments