If there is a one-variable function, we can f/@{a,b,c}
to get {f[a],f[b],f[c]}
What to do with it if it comes to a binary function f[#1,#2]&
, and a list {a,b,c}
and we want to "Map" it into a list funtion {f[#1,a],f[#1,b],f[#1,c]}&
I have found a strange way:
MapThread[f,{Table[#,3],{a,b,c}]&
though mathematica can't expand it, but it can actually work?! [doge]
if we add [x]
behind it, we get the answer
MapThread[f,{Table[#,3],{a,b,c}]&[x]
>>> {f[x, a], f[x, b], f[x, c]}
Function@Evaluate@Map[Function[x, f[#, x]]]@{a, b, c}
? $\endgroup$Evaluate[f @@@ Thread[{#, {a, b, c}}]] &
$\endgroup$