Consider the lists:
list1={a,b,c};
list2={x,y,z};
I want to Thread
If
elementwise across the lists. I can achieve this with MapThread
but cannot with Thread
In[1]:= MapThread[If[#1>#2,1,0]&,{list1,list2}]
Out[1]= {If[a>x,1,0],If[b>y,1,0],If[c>z,1,0]}
It fails when I try to do it with Thread
In[2]:= Thread[If[#1>#2,1,0]&[list1,list2]]
Out[2]= If[{a,b,c}>{x,y,z},1,0]
Academic Question
How can I perform the functionality with Thread
instead of MapThread
?