What is the rationale for Thread not threading as a side effect if the arguments of the function to be threaded can be fully evaluated?
For example,
ClearAll[b];
Thread[{1,2,3}=={1,b,3}]
gives (threading)
{True,2==b,True}
But
ClearAll[b];
b=2;
Thread[{1,2,3}=={1,b,3}]
gives (no threading, and a completely different type of result)
True
And
ClearAll[b];
Thread[{1,2,3}=={1,b,3}]/.b->2
gives
{True,True,True}
What's the purpose of the behavior? Shouldn't Thread always thread?
Note: the question is how the comes about ("Thread evaluates its arguments"); but why it makes sense to do this? Why make whether threading actually happens contingent on the state of arguments.
Tracewill illuminate the internal processing. – Mike Honeychurch Dec 14 '15 at 22:44Threadnot thread, as a side effect), not how it comes about; see the question. – orome Dec 14 '15 at 22:46Threadis always threading. However you see something different to what you want because arguments are evaluated prior to threading. There is noHoldFirstor similar attribute. – Mike Honeychurch Dec 14 '15 at 23:12MapThread. – orome Dec 14 '15 at 23:37??orAttributesis highly recommended. – m_goldberg Dec 15 '15 at 01:08