Re: Thread? Through? Operate?
- To: mathgroup at smc.vnet.net
- Subject: [mg32427] Re: [mg32388] Thread? Through? Operate?
- From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
- Date: Sat, 19 Jan 2002 19:03:25 -0500 (EST)
- References: <200201180517.AAA17474@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Johannes:
Here is the first solution that comes to mind:
Inner[#1[#2]&, f, arg, List]
Ken Levasseur
Math. Sci.
UMass Lowell
Johannes Ludsteck wrote:
> Dear MathGroup members,
> I have a list of n unnamed functions
>
> f = {expr1 &, expr2 &,... ,exprn &}
> (each function has exactly one arguement.
> and a list of n arguments.
>
> arg = {arg1, arg2,... ,argn}
>
> I simply want to apply each function expri &
> to the respective argument argi in order
> to obtain the list of function values fi.
> Is there no more elegant way than the following one?
>
> Map[#[[1]][#[[2]]]&, Transpose[{f,arg}]
>
> Thanks,
> Johannes
>
> <><><><><><><><><><><><><><><><><><>
> Johannes Ludsteck
> Institut fuer Volkswirtschaftslehre
> Lehrstuhl Prof. Dr. Moeller
> Universitaet Regensburg
> Universitaetsstrasse 31
> 93053 Regensburg
> Tel +49/0941/943-2741
- References:
- Thread? Through? Operate?
- From: "Johannes Ludsteck" <johannes.ludsteck@wiwi.uni-regensburg.de>
- Thread? Through? Operate?