For given functions $f,g,\cdots$ I want to define a pure function that, when applied to any list $\{x,y,\cdots\}$ (of the same length as $\{f,g,\cdots\}$), produces $\{f[x],g[y],\cdots\}$. Two ways to achieve this are
{f@#[[1]],g@#[[2]],...} &
and
MapThread[
#1[#2] & (* or Apply[#1,{#2}] & *),
{{f,g,...},#}
] &
With all of Mathematica's built in functions, however, I would be surprised if there does not exist a slicker way to do this. Thus my question is: is there a more elegant way to do the above?
For concreteness let's take just to functions $\{f,g\}$ and apply it to $\{x,y\}$, yet I'm hoping for an answer that generalizes to more than two functions.
Although I would expect that this has been asked here before I cannot find it.
MapThreadyou show here. – Szabolcs Nov 02 '16 at 12:57MapThreadwas designed for. – march Nov 02 '16 at 15:42MapThread, you could useComposerather than a pure function:MapThread[Compose, {{f, g, ...}, #}] &. – Nov 02 '16 at 19:15