I have two lists of equal lengths but for my task I will use 3-element lists , namely {x,y,z} and {f,g,h}. The first contains variables and the second functions.
I want to produce {f[x],g[y],h[z]} with input the above lists in as many ways as possible.
Until now I have devised the following ones:
Inner[#1[#2]&,{f,g,h},{x,y,z},List]
and
MapThread[#1[#2]&,{{f,g,h},{x,y,z}}]
As pointed out , there is a very similar thread at wolfram's community.
If I come up with more solutions I will add them here.
Update
I am updating with the one-liners. In Wolfram's Community forum there are also solutions changing Attributes or using Append but I will omit them here.
MapThread[#1[#2]&,{{f,g,h},{x,y,z}}]
Inner[#1[#2]&,{f,g,h},{x,y,z},List]
Diagonal[Through/@Distribute[{f,g,h}[{x,y,z}],List]
MapThread[Compose,{{f,g,h},{x,y,z}}]
Apply[List,{f,g,h}.{x,y,z}/.Times->(Operate[##1,0]&)] and Apply[List,{f,g,h}.{x,y,z}/.Times->(#1[#2]&)] work only because f,g,h are before x,y,z in alphabetical order as very well pointed out by @andre
Apply[Compose,Thread[{{f,g,h},{x,y,z}}],{1}]
(#1[[1]][#1[[2]]]&)/@Transpose[{{f,g,h},{x,y,z}}]
Apply[List, {f, g, h}.{x, y, z} /. Times -> (Operate[##1, 0] &)]works only because f,g,h are before x,y,z in alphabetical order. The problem is the commutativity ofTimes. For exampleApply[List, {f, g, h}.{a, y, z} /. Times -> (Operate[##1, 0] &)]doesn't work. – andre314 Dec 12 '13 at 20:32{f[1],f[2],f[3]}and{x[1],x[2],x[3]}could be used (of course f is still before x in alphabetical order). – tchronis Dec 12 '13 at 20:43Apply@@@Transpose[{...}]- there is such example but with different syntax. – Kuba Dec 12 '13 at 21:04f. – tchronis Dec 12 '13 at 21:48